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