Implement ClearTarget with Unity Event

I created an OnMoveCommandGiven Unity Event in the Unit Movement script and invoked it right at the top of the CmdMove function.

Then in the inspector, I assigned the Targeter ClearTarget function to the OnMoveCommandGiven event.

It is all handled on the server and that way the movement code is not dependent on the Targeter class.

Any disadvantages to doing it this way with Mirror?

Privacy & Terms