/// <summary> /// Called on Start /// </summary> protected override void Start() { base.Start(); // pre-allocate list memory _neighbours = new DynamicArray<Cell>(8); _lastPathPortalIndex = -1; var unit = this.GetUnitFacade(); if (!unit.isMovable) { // if this unit is not Movable, it cannot and will not request a path if it gets stuck outside the vector field Debug.LogWarning(this.gameObject.name + " does not have a component that implements IMovable, which means that if it gets stuck, it cannot request a path to get to the destination"); } _steeringController = this.GetComponent<SteeringController>(); if (_steeringController == null) { Debug.LogWarning(this.gameObject.name + " does not have a SteeringController component, which means that it cannot disable formations while solo pathing"); } }
/// <summary> /// Called on Start /// </summary> protected override void Start() { base.Start(); // pre-allocate list memory _neighbours = new DynamicArray <Cell>(8); _lastPathPortalIndex = -1; var unit = this.GetUnitFacade(); if (!unit.isMovable) { // if this unit is not Movable, it cannot and will not request a path if it gets stuck outside the vector field Debug.LogWarning(this.gameObject.name + " does not have a component that implements IMovable, which means that if it gets stuck, it cannot request a path to get to the destination"); } _steeringController = this.GetComponent <SteeringController>(); if (_steeringController == null) { Debug.LogWarning(this.gameObject.name + " does not have a SteeringController component, which means that it cannot disable formations while solo pathing"); } }