Skip to main content

Class FloatVariable

Self-contained, asset-based float variable

[CreateAssetMenu(fileName = "New FloatVariable", menuName = "ScriptableObject/Scriptable/Variable/FloatVariable")]
public class FloatVariable : BaseScriptableVariable<float>, IAddable<float>, ISubtractable<float>

Inheritance​

Derived​

Implements​

Inherited Members​

Remarks​

This scriptable object stores a runtime float value that can be persisted and shared across scenes.

Methods​

Add(float)​

Adds a value to the runtime variable.

public virtual void Add(float value)

Parameters​

NameTypeDescription
valuefloatThe value to add.

Subtract(float)​

Subtract a value to the runtime variable.

public virtual void Subtract(float value)

Parameters​

NameTypeDescription
valuefloatThe value to subtract.