DarkRewar / BaseTool

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

Add `EnableIf` and `DisableIf` attributes #95

Closed DarkRewar closed 4 months ago

DarkRewar commented 4 months ago

Like the IfAttribute worked, create a ConditionalAttribute that makes the field disabled or enabled depending on the expression.

public bool IsStrong = true;

[EnableIf(nameof(IsStrong))]
public float Strength = 10f;