Example #1
0
    public void moveUnitOnSpawn(NetworkInstanceId id)      //moves your new battalion out of spawn
    {
        GameObject obj       = ClientScene.FindLocalObject(id);
        Battalion  battalion = obj.GetComponent <Battalion> ();

        battalion.spawnMove(unitFlagStart, unitFlagEnd);
        //move new spawned unit to unit flag start, then get into formation & give player control
        //once in formation(and only when in formation) move to unit flag end (but player can just select them and move them at this point)
    }