- Home /
Question by
justasxz · Mar 14, 2017 at 08:46 AM ·
animationscripting problemscript.animations
GameObject from macinim ?
Hello guys so bassicly
void OnStateExit ()
{
vm = GameObject.Find("vt/vm");
vm.transform.GetComponent<Renderer>().enabled = false;
vm.transform.GetComponent<CharacterController>().enabled = false;
dantis = GameObject.Find("/vt/vm/vd");
dantis.transform.GetComponent<Renderer>().enabled = true;
}
i want to change this for it to be unique i mean it searches for specific path now it Works but i want it to find it from anywhere is it possible to make this script find to who it is attached to and its children/parents and get it as a variable that i can use ?
Comment