Move Position Order

public sealed class MovePositionOrder : Order

Use this order type to give a unit an order to move to a specific position - you can put any position on the map here, just pass it into the MovePositionOrder constructor (or assign the MovePosition field of the class instance).

Example

// this example code running from Unit.cs component

Unit unit = this; // getting the unit component from which we run this code.

MovePositionOrder order = new MovePositionOrder(new Vector3(15, 30, 0)); // creating new MovePositionOrder here, with any Vector3 position.

unit.AI.AddOrder(order, false); // adding the created order to the unit's orders list