Answer by Piflik
You cannot access private variables directly from other scripts at all. You would need getter/setter functions... Public variables can be accessed by: gameObject.GetComponent(ScriptName).VariableName;...
View ArticleAnswer by jogo13
You'll have to do it via attached script classes (which can be attached as 'components.') Even the basic Gameobject is class that is a collection of other classes and structs (such as transform.)...
View ArticleAnswer by Piflik
You cannot access private variables directly from other scripts at all. You would need getter/setter functions... Public variables can be accessed by: gameObject.GetComponent(ScriptName).VariableName;...
View ArticleAnswer by jogo13
You'll have to do it via attached script classes (which can be attached as 'components.') Even the basic Gameobject is class that is a collection of other classes and structs (such as transform.)...
View ArticleAnswer by Piflik
You cannot access private variables directly from other scripts at all. You would need getter/setter functions... Public variables can be accessed by: gameObject.GetComponent(ScriptName).VariableName;...
View ArticleAnswer by jogo13
You'll have to do it via attached script classes (which can be attached as 'components.') Even the basic Gameobject is class that is a collection of other classes and structs (such as transform.)...
View Article
More Pages to Explore .....