Ignition / VirtualFloats

Namespace Playniax.Ignition

Inherits from MonoBehaviour

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

Class VirtualFloats

Description

Allows for dynamic creation, retrieval, and modification of float 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.
float Get(string key, float 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, float value)Sets the value of a property with the given key in the properties list.