Real time strategy Movement via Button

Hello,
I am currently developing a game i have a plane (“Ocean”) for ships to travel on i have baked Navmesh and i have a “ship” (object) that moves to where i click, No worries there, I also have a hex terrain layer in place (Under the “ocean”) and i have a prefab UI Button that will instantiate on the centre of the nearest hex found under the click and now comes my problem that i am here asking for help.

My problem is i want to enable the movement script upon clicking the Button that gets Instantiated when i click anywhere on the map…
Click and a button appears at the click location then i want the ship to move to this location upon button click (button text)“Move Here” the “Ship” moves there.

Privacy & Terms