Race condition with the unit referenced in the editor on UnitActionSystem

We have defined a default selected unit on the UnitActionSystem but there is a race condition (at least on my machine) where the GridSystemVisual.Start() runs before the Unit.Start(). This then starts the game with my default unit - which is not at position 0,0 - to be displayed incorrectly because the Unit has not retrieved its grid position yet and returns the default 0,0. Once I have selected a different unit, everything is fine. It’s just visually not displaying the correct things at start.

To solve it I have added Unit to the script execution order

2 Likes

Oh good catch! Yup it’s related to the execution order so some people might see that and others might not, it didn’t happen on my end so didn’t notice it.

What I would do is add the GridSystemVisual to run after the Default Time since you want the visuals to run after everything else.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms