// Use this for initialization void Start() { anim = GetComponent<AirmenAnimator> (); agent = GetComponent<NavMeshAgent> (); GameObject zoneObj = Instantiate(Resources.Load("NPCZone", typeof(GameObject))) as GameObject; zoneObj.transform.position = transform.position; zone = zoneObj.GetComponent<SphereCollider> (); zone.radius = zoneRadius; zone.enabled = false; locationPoint = Instantiate(Resources.Load("LocationPoint", typeof(GameObject))) as GameObject; locationPoint.SetActive (false); }
// Use this for initialization void Start() { anim = GetComponent<AirmenAnimator>(); }