Skip to content

Commit

Permalink
Fix DivEquals characters in menu
Browse files Browse the repository at this point in the history
Move to Unicode rather than slash to avoid Unity turn it into a menu or spacer
Fix #852
  • Loading branch information
stevehalliwell committed Jul 10, 2020
1 parent dee8f84 commit 2580345
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Assets/Fungus/Scripts/Utils/VariableUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ public static string GetSetOperatorDescription(SetOperator setOperator)
break;

case SetOperator.Divide:
return "/=";
break;
//https://answers.unity.com/questions/398495/can-genericmenu-item-content-display-.html
// '/' in a menu means submenu and because it had no leading text, Unity thinks we want a spacer
// using unicode alternates for / fix the problem.
return "\u200A\u2215\u200A=";
break;
}

return string.Empty;
Expand Down

0 comments on commit 2580345

Please sign in to comment.