Class GameplayGlobals
The global gameplay variables container asset that can be accessed across whole project.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class GameplayGlobals : BinaryAsset
Constructors
GameplayGlobals()
Properties
DefaultValues
Gets or sets the default values (edit-time).
Declaration
[Unmanaged]
public Dictionary<string, object> DefaultValues { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.String, System.Object>
|
Values
Gets or sets the values (run-time).
Declaration
[Unmanaged]
public Dictionary<string, object> Values { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.String, System.Object>
|
Methods
GetValue(String)
Gets the value of the global variable (it must be added first).
Declaration
[Unmanaged]
public object GetValue(string name)
Parameters
System.String
name
The variable name. |
Returns
System.Object
The value. |
ResetValues()
Resets the variables values to default values.
Declaration
[Unmanaged]
public void ResetValues()
SetValue(String, Object)
Sets the value of the global variable (it must be added first).
Declaration
[Unmanaged]
public void SetValue(string name, object value)
Parameters
System.String
name
The variable name. |
System.Object
value
The value. |