/// <summary> /// Called by Unity. /// Can be overriden but be sure to call base.Start() to allow the agent to initialize properly. /// </summary> public virtual void Start() { // CHeck if we have a grid if (searchGrid == null) { // Try to access a default grid searchGrid = AStarGridManager.DefaultGrid; // Check for error if (searchGrid == null) { // Print a warning Debug.LogWarning(string.Format("Agent [{0}]: The are no AStar Grids in the scene. Pathfinding is not possible", gameObject.name)); } } }
internal static void unregisterGrid(AStarAbstractGrid grid) { // Remove the grid from the list activeGrids.Remove(grid); }
// Methods internal static void registerGrid(AStarAbstractGrid grid) { // Add the grid to the active grids activeGrids.Add(grid); }