using System;
using MLAPI;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Call this to recalculate the path when the navigation mesh or dynamic obstacles changed.
/// </summary>
public void OnNavMeshChanged()
private void OnNavMeshChanged()
{
RecalculatePath();
}
public void Clear()
m_Path.Clear();
;
using NUnit.Framework;
using UnityEngine.Assertions;
namespace BossRoom.Server
/// Whether all paths need to be recalculated in the next fixed update.
private bool navMeshChanged;
private bool m_NavMeshChanged;
navMeshChanged = true;
m_NavMeshChanged = true;
if (navMeshChanged)
if (m_NavMeshChanged)
navMeshChanged = false;
m_NavMeshChanged = false;
using UnityEditor;
if (gameObject.scene.rootCount > 1) // Hacky way for checking if this is a scene object or a prefab instance and not a prefab definition.
Assert.NotNull(
GameObject.FindGameObjectWithTag(NavigationSystem.NavigationSytemTag)?.GetComponent<NavigationSystem>(),
Assert.IsTrue(
GameObject.FindGameObjectWithTag(NavigationSystem.NavigationSytemTag)?.GetComponent<NavigationSystem>() != null,
$"NavigationSystem not found. Is there a NavigationSystem Behaviour in the Scene and does its GameObject have the {NavigationSystem.NavigationSytemTag} tag? {gameObject.scene.name}"
);