GridSystemVisual.Start()
calls GridSystemVisual.UpdateGridVisual()
which calls MoveAction.GetValidActionGridPositionList()
which calls Unit.GetGridPosition()
which returns Unit.gridPosition
.
However Unit.gridPosition
is initialized in Unit.Start()
! So, when the game starts, it randomly bugs if Unit.Start()
of the default selected unit is executed after GridSystemVisual.Start()
.
To fix it, I changed the script execution order for Unit.cs
: