Both Units are moving together on one click

After adding this in Unit script

private void Awake()
    {
        targetPosition = transform.position;
    }

Both units are moving together. They stop at the start of the gameplay but when i click they both move together.

Did you do the bits at the beginning of the lecture? That is, create the UnitActionSystem class, assigned the Unit to it, and move the ‘Move’ code into it’s update method? Did you remove the old ‘Move’ code from the `Unit.cs’?

Yeah Just found out I did not removed the input code from Unit script after that its working fine.

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

Privacy & Terms