DarkRewar / BaseTool

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

Add `EnableIf` and `DisableIf` attributes #95

Closed DarkRewar closed 6 months ago

DarkRewar commented 6 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;