Ignition / VirtualInts

Namespace Playniax.Ignition

Inherits from MonoBehaviour

Script can be found in Assets/Playniax/Framework/Ignition/Framework/Core/Scripts (MonoBehaviour)/VirtualInts.cs

Class VirtualInts

Description

Allows for dynamic creation, retrieval, and modification of integer properties during runtime, providing flexibility in managing game parameters.

Properties are automatically destroyed when a new scene is loaded.

Public MethodsDescription
bool Contains(string key)Checks if a property with the given key exists in the properties list.
Property Get(string key)Retrieves a property with the given key from the properties list.
int Get(string key, int defaultValue)Retrieves the value of a property with the given key from the properties list.

If no property with the given key is found, returns the default value specified.
void Set(string key, int value)Sets the value of a property with the given key in the properties list.