BaseGlobalVariablesSetVariableByString Method |
Allows setting a variable by its name.
Namespace:
Articy.Unity
Assembly:
ArticyRuntime (in ArticyRuntime.dll) Version: 1.0.3
Syntax public void SetVariableByString(
string aVariableName,
Object aValue
)
Parameters
- aVariableName
- Type: SystemString
Full qualified name of the variable. - aValue
- Type: SystemObject
The new value. For the value its not necessary to be the exact type of the target global variable, the method will try to convert it to the global variable. So it is safe for example to set a number global variable by supplying a string containing a number.
Remarks You can use this method to set the variable from which you know its full name in code. This is can be especially useful in conjunction with RawScript
, or when loading a save game
See Also