
Checkbox display in unit header
Unity Version: 2018.1f1
Bolt Version 1.3
Using the following syntax below, a toggle with no label will appear that can be modified.
[UnitHeaderInspectable, Inspectable]
public bool DoPlayImmediately;
If you provide a label using UnitHeaderInspectable's constructor like below, a label is displayed, but no longer can be modified. Likely the GUIContent is overlapping the editor toggle such that it can no longer receieve input.
[UnitHeaderInspectable("Play Immediately"), Inspectable]
public bool DoPlayImmediately;
Expected: Using default constructor for UnitHeaderInspectable should use property name as label. Using overloaded constructor that provides label for property in unit UI should not prevent access to modify variable.
Actual: No label is shown for
Customer support service by UserEcho
UnitHeaderInspectable with default constructor and using overloaded constructor to provide label prevents toggle from being modified.
Does adding [InspectorToggleLeft] help on your bool? Which should be used to maintain proper layouts for a bool, only specific type I know that needs an attribute for headers.. Or is this happening with every type?
Using [InspectorToggleLeft] allows the editor toggles to be switched off and on. This same issue of not being able to interact does not occur with an Enum.
What's interesting is that the label text for a bool property almost seems to be a different shade of white/gray then for an enum property. I don't have any insight into why that is, but its noticeable when zoomed into the unit's fields. I've pasted below an example of two bool and an enum property that are all able to be modified with different colored label text.
I'll look into it. I always use [InspectorToggleLeft] for header items so I had never noticed, but I'll try to get it fixed regardless, especially the color tone.
This was surprisingly hard to fix, but it'll make it into v.1.4.0 beta 2.