Read-Only Variables

Read-Only Assets

For example, if you would normally reference a FloatVariable, it would look like this:

[SerializeField] private FloatVariable _floatVariable;

To use the Read-Only version, simply declare a FloatVariableReadOnly instead:

The Value field will now be immutable, both in the Inspector and in code. A lock icon is displayed to make it visually clear that this variable is Read-Only.

You can still register to its OnValueChanged event as usual:

Last updated