Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     getRock   = gameObject.GetComponentInChildren <RockRoll>();
     camListen = GameObject.Find("CameraListener").GetComponent <CameraListener>();          //"OBJECT NAME" <CLASS NAME>
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     getRock   = transform.parent.GetComponent <RockRoll>();                        // Set this object ot the parent of the Object
     camListen = GameObject.Find("CameraListener").GetComponent <CameraListener>(); //"OBJECT NAME" <CLASS NMAE>
 }