Skip to main content

Class IntVariable

A self-contained, asset-based int variable.

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

Inheritance​

Implements​

Inherited Members​

Remarks​

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

Methods​

Add(int)​

Adds a value to the runtime integer variable.

public virtual void Add(int value)

Parameters​

NameTypeDescription
valueintThe value to add.

Subtract(int)​

Subtracts a value from the runtime integer variable.

public virtual void Subtract(int value)

Parameters​

NameTypeDescription
valueintThe value to subtract.