I'm making turn-based strategy game. It has limit that you cannot just scroll to enemy's basement, you must send units there. This may sound as trivia but it is important to know.
So in the moment, if you click your own unit, game will scroll towards it. That is one way to select an unit. But there should also be another way to select units- i tough something like a list of unit objects in-game, and when you click any of them in list game scrolls to clicked one. But i have no idea how to do it.
Can you tell me how to do it or something like it?
Develop games in your browser. Powerful, performant & highly capable.
The objects in the list store the units uid or some instance variable, then when you click object in list pick unit object by that uid or instance var.
Thank you. That helped me a lot, but can you tell also how to scroll to object X whose UID is same as selected?
Maybe put ScrollTo behaviour on the object you want to scroll to.