Variable Reference
1_ScriptableVariable
Last updated
1_ScriptableVariable
Last updated
You might have noticed that _maxHealth’s type is a FloatReference instead of a FloatVariable. It allows you to choose between a local value or scriptable variable.
This can be useful if you have multiple objects that share the same components, let’s say different cars that share the same controller. Each car can have a reference to a FloatReference for the speed. The player car will choose a FloatVariable and the other cars can just have a local variable.
All default types included in Soap have their corresponding reference scripts.