// Use this for initialization private void Start() { mode = PlayerPrefs.GetInt("IsAutoMode"); //Debug.Log(mode); Debug.Log("AICharacterControl - Start()"); // get the components on the object we need ( should not be null due to require component so no need to check ) agent = GetComponent <NavMeshAgent>(); character = GetComponent <MoveCharator>(); agent.updateRotation = false; agent.updatePosition = true; if (mode != 1) { targetPicker.SetActive(true); } EventManager.Instance.AddListener("OnMoveToObject", OnEvent); }
// Use this for initialization private void Start() { mode = PlayerPrefs.GetInt("IsAutoMode"); //Debug.Log(mode); Debug.Log("AICharacterControl - Start()"); // get the components on the object we need ( should not be null due to require component so no need to check ) agent = GetComponent<NavMeshAgent>(); character = GetComponent<MoveCharator>(); agent.updateRotation = false; agent.updatePosition = true; if (mode != 1) { targetPicker.SetActive(true); } EventManager.Instance.AddListener("OnMoveToObject", OnEvent); }