DarkRewar / BaseTool

A big library of basic tools that you might need in your Unity projects.
MIT License
45 stars 6 forks source link

CustomDrawers are not properly displayed if they have `IfAttribute` #94

Open DarkRewar opened 6 months ago

DarkRewar commented 6 months ago

If a custom drawer also has a ConditionalAttribute like IfAttribute, the element isn't drawn properly in the inspector.

public bool DisplayCooldown;

[If("DisplayCooldown")]
public Cooldown CooldownIf = 1.1f;
image
DarkRewar commented 5 months ago

This is a REALLY big issue due to the IfDrawer (conditonnal drawer) that overrides any custom property drawers.

To avoid this, I must rework the drawer system and use a custom inspector editor (that would be unusable with Odin or any other inspector)