FRAttributes

FRVariable attributes can be used as variable decorators which are displayed in the inspector. This can be quite handy if you want to create your own custom GUI drawing like a custom slider, button or dropdown. See the FRFloatRange attribute for example.

[Title]

[Title("My Variable")]
public FRFloat floatVariable;

Draw a title on top of the variable.

[HelpBox]

[HelpBox("This is a help message", MessageType.info)]
public FRFloat floatVariable;

Draw a helpbox on top of the variable.

[OpenURL]

[OpenURL("Title", "http://www.google.com")]
public FRFloat floatVariable;

Draw a gui button which opens a webpage.

[Hide]

[Hide]
public FRFloat floatVariable;

Hide the variable field in the inspector

[HideInNode]

[HideInNode]
public FRFloat floatVariable;

Hide the variable field in the node.

[VariableGroup]

[VariableGroup("Group")]
public FRString log;
[VariableGroup("Group")]
public FRString log2;

Combine multiple variables in foldable groups

[FRFloatRange]

[FRFloatRange(0f, 10f)]
public FRFloat myFloat;

Draw a float field slider.

[FRIntRange]

[FRIntRange(0f, 10f)]
public FRInt myInt;

Draw an int field slider.

[SceneObjectOnly]

[SceneObjectOnly]
public FRGameObject prefab;

Allow only scene object references to be assigned.

Last updated