Answers for "how to use a function from a scrpt of a gameobject into another class"

C#
0

how to use a function from a scrpt of a gameobject into another class

GameObject go = GameObject.Find("somegameobjectname");
ScriptB other = (ScriptB) go.GetComponent(typeof(ScriptB));
other.DoSomething();
Posted by: Guest on March-12-2021

Code answers related to "how to use a function from a scrpt of a gameobject into another class"

C# Answers by Framework

Browse Popular Code Answers by Language