Search Unity

What's the best way to program a "Select this Unit" Mechanic?

Discussion in 'Navigation' started by Chollovary, Mar 17, 2018.

  1. Chollovary

    Chollovary

    Joined:
    Dec 6, 2015
    Posts:
    3
    In my game the player moves guards around the map using NavMeshes. But, when they click on the map all the guards move at once.

    I want a way for the player to be able to press numbers 1-9 and whatever number they press a guard is selected and only the guard that is selected moves where-ever the player clicks.


    How would I go about coding something like this? What would be the best way to do it?

    I would really appreciate any help given! :D