예제 #1
0
 // Use this for initialization
 void Start()
 {
     getRock   = gameObject.GetComponentInChildren <RockRoll>();
     camListen = GameObject.Find("CameraListener").GetComponent <CameraListener>();          //"OBJECT NAME" <CLASS NAME>
 }
예제 #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>
 }