A plyBlox variable. plyBlox has 3 types of variables. Global, which is accessible from anywhere via plyBloxGlobal and belongs to the game project. Local, which belongs to a Blox object. Temporary, which is only valid within an Event and that Event only.
More...
|
string | name |
| Name of the variable.
|
|
VariableType | type = VariableType.String |
| The data/ value type of the variable.
|
|
bool | boolValue |
|
int | intValue |
|
float | floatValue |
|
string | stringValue |
|
Rect | rectValue |
|
Color | colorValue |
|
Vector2 | vect2Value |
|
Vector3 | vect3Value |
|
GameObject | goValue |
|
UnityEngine.Object | uObjValue |
|
System.Object | sObjValue |
|
bool | persist = true |
|
A plyBlox variable. plyBlox has 3 types of variables. Global, which is accessible from anywhere via plyBloxGlobal and belongs to the game project. Local, which belongs to a Blox object. Temporary, which is only valid within an Event and that Event only.
You will normally use the functions in plyBloxGlobal and plyBlox to manipulate variables. The variable support various types. See VariableType for a list of supported types.
object plyBloxKit.plyVar.GetValue |
( |
| ) |
|
Returns the value contained in this variable.
void plyBloxKit.plyVar.SetValue |
( |
object |
val | ) |
|
Set the variable's value.
override string plyBloxKit.plyVar.ToString |
( |
| ) |
|
Returns the string of the variable's value.
bool plyBloxKit.plyVar.TryGetBlox |
( |
out plyBlox |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.
bool plyBloxKit.plyVar.TryGetBool |
( |
out bool |
v | ) |
|
Attempts to get a bool value from the variable.
- Parameters
-
v | [out] The Boolean value result. |
- Returns
- true if it succeeds, false if it fails to cast to a bool value.
bool plyBloxKit.plyVar.TryGetColor |
( |
out Color |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.
bool plyBloxKit.plyVar.TryGetComponent |
( |
out Component |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.
bool plyBloxKit.plyVar.TryGetFloat |
( |
out float |
v | ) |
|
Attempts to get float value from the variable.
- Parameters
-
v | [out] The Float value result. |
- Returns
- true if it succeeds, false if it fails to cast to a float value.
bool plyBloxKit.plyVar.TryGetGameObject |
( |
out GameObject |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.
bool plyBloxKit.plyVar.TryGetInt |
( |
out int |
v | ) |
|
Attempts to get an int value from the variable.
- Parameters
-
v | [out] The Integer value result. |
- Returns
- true if it succeeds, false if it fails to cast to an int value.
bool plyBloxKit.plyVar.TryGetRect |
( |
out Rect |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.
bool plyBloxKit.plyVar.TryGetUnityObject |
( |
out Object |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.
bool plyBloxKit.plyVar.TryGetVector2 |
( |
out Vector2 |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.
bool plyBloxKit.plyVar.TryGetVector3 |
( |
out Vector3 |
v | ) |
|
Attempts to get value from the variable. Return false and a default value if failed.