Attributes

Table of Content

Table of Content

Table of Content

Show If / Hide if

Allows you to display or hide a variable based on conditions.

The first parameter corresponds to the exact name of the variable.

The second corresponds to the desired condition value.

using MVsToolkit.Dev;



public bool LimitSpeed;
public MovementType MoveType;

[ShowIf("LimitSpeed", true)] 
public float MaxSpeed = 10f;

[HideIf("MoveType", MovementType.Swim)] 
public float GravityForce; 

public enum MovementType
{
    Run,
    Swim,
    Fly
}

Require namespace MVsToolkit.Dev

Only supports bool and enum condition

Create a free website with Framer, the website builder loved by startups, designers and agencies.