// Use this for initialization void Start() { m_Animator = GetComponent<Animator> (); detection = this.GetComponentsInChildren<DetectorScript> () [0]; v = GetComponentInChildren<Villian> (); }
// Use this for initialization void Start() { m_Animator = this.transform.parent.gameObject.GetComponentInChildren<Animator> (); this.rend = GetComponent<Renderer>(); //rend.material.shader = Shader.Find("Standard"); this.cursorRend=cursor.GetComponent<Renderer>(); ds = this.transform.parent.GetComponentInChildren<DetectorScript> (); }