Hi !!!
How as I can make a global variables, using it with different script without use the function GameObject.find?
Thank You …
Hi !!!
How as I can make a global variables, using it with different script without use the function GameObject.find?
Thank You …
uuppp
One way to do this is to create a class that has static variables:-
class SomeVars {
static var playerName: String;
static var startPosition: Vector3;
...etc...
}
You can set and read these from anywhere in the game using the class name (ie, not an object reference) to qualify the field names:-
SomeVars.playerName = "Andy";
SomeVars.startPosition = Vector3.zero;
thank you andeeee , run !
=)