Support Forum

Select one or multiple units

Hey, just picked up the asset and loving it! I’m still quite new to Unity in general though and would like to be pointed in the right direction for a few things. Would appreciate any suggestions or direct links to documentation.

Just FYI I am working on a 2D RTS prototype and currently basing most of the project on the RVO 2D example. Tried downloading the beta to make the RTS example work but it is causing a lot of compile errors. After installing burst 1.3 preview and entities, the compiler errors went away but when entering play mode nothing happens other than the units floating away from the game surface for some reason. Am I missing something that would make the beta version more stable?

Anyways these are the key problems I am trying to wrap my head around right now:

  1. Select one or multiple units - currently when a new target is assigned, all units of that layer will move to the new target. What would be the easiest way to individually select one or a group of units to assign specific as is usually seen in most RTS games? Would it make sense to set up a game manager for this purpose (the RVO example does not have one). Most online tutorials I find for this purpose seem unnecesasrily convoluted so would really like to see how this problem is solved in the easiest way with the A* asset.

  2. Updating unit target automatically - I would like for enemy UI to patrol different sections of the map while my player army does it’s thing. Would it make sense to adjust the destination setter UI for this?

  3. Deciding Friendly/enemy units - I’ve gotten a very basic battle system to work (activate battle animation when close to enemy unit, etc.) where friendly units are tagged as friendly and enemies as enemy. This works for now but I’m worried it might get too messy to keep track of later if other factions are added. No specific question here but wondering if there is a clever use of the layer system to resolve this and keep different faction troops (and their war/peace status updated in real time to prevent ‘wrong’ attacks).

I realize some of these questions might be a bit too basic, and happy to read documentation if you can point me in the right direction, especially for problems 1 and 2. Will share more code here as I encounter issues. Thanks again for a great asset!