private void Awake() { m_NavMeshAgent = GetComponent <NavMeshAgent>(); m_NetworkCharacterState = GetComponent <NetworkCharacterState>(); m_CharLogic = GetComponent <ServerCharacter>(); m_Rigidbody = GetComponent <Rigidbody>(); m_NavigationSystem = GameObject.FindGameObjectWithTag(NavigationSystem.NavigationSystemTag).GetComponent <NavigationSystem>(); }
/// <summary> /// Creates a new instance of the <see cref="DynamicNavPath"./> /// </summary> /// <param name="agent">The NavMeshAgent of the object which uses this path.</param> /// <param name="navigationSystem">The navigation system which updates this path.</param> public DynamicNavPath(NavMeshAgent agent, NavigationSystem navigationSystem) { m_Agent = agent; m_Path = new List <Vector3>(); m_NavMeshPath = new NavMeshPath(); m_NavigationSystem = navigationSystem; navigationSystem.OnNavigationMeshChanged += OnNavMeshChanged; }
private void Awake() { m_NavigationSystem = GameObject.FindGameObjectWithTag(NavigationSystem.NavigationSystemTag).GetComponent <NavigationSystem>(); }