// Use this for initialization
    void Awake()
    {
        INavMesh levelMesh = GameObject.FindObjectOfType <TriangleNavMesh>();

        List <INavCell> allCells = levelMesh.getAllNavCells();

        foreach (INavCell cell in allCells)
        {
            setProperties(cell);
        }
    }
示例#2
0
 internal NavMesh(INavMesh fragment)
 {
     this.fragment = fragment;
 }
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="navMesh">Is a pointer to the user's navmesh class.</param>
 public FindMyPath(INavMesh navMesh)
 {
     NavMesh = navMesh;
 }
示例#4
0
 void Awake()
 {
     levelNavMesh          = GameObject.FindObjectOfType <TriangleNavMesh>();
     visitedDistancesCache = new Dictionary <GameObject, Dictionary <string, Dictionary <INavCell, float> > >();
     lastLocationCache     = new Dictionary <GameObject, Vector3>();
 }
示例#5
0
 void Start()
 {
     levelNavMesh = GameObject.FindObjectOfType <TriangleNavMesh>();
     Debug.Log("levelNavMesh came back as " + levelNavMesh);
 }