Class DynamicVariable<T>
- Namespace
- HomaGames.Geryon
- Assembly
- HomaGames.HomaBelly.Core.dll
Class representing a dynamic variable. This class can only host bool, int, double or string values.
[Obsolete("Type is obsolete and will be removed in the future versions. Use HomaGames.Geryon.Config.DvrDatabase instead.")]
public static class DynamicVariable<T>
Type Parameters
TThe data type of the variable
- Inheritance
-
DynamicVariable<T>
- Inherited Members
Methods
Get(string, T)
public static T Get(string key, T defaultValue)
Parameters
keystringdefaultValueT
Returns
- T
Set(string, T)
Updates the dynamic variable referenced by key, if it exists.
If not, adds it to the dictionary
public static void Set(string key, T value)
Parameters
keystringThe key referencing the dynamic variable
valueTThe new value
TryGet(string, out T)
Try getting an LiveOps value from a key.
public static bool TryGet(string key, out T value)
Parameters
keystringvalueT
Returns
- bool
Returns true if the value is available.