RTS Unit Selection

TRavljen

(0)
$14
Publisher TRavljen
File size 144.52kB
Number of files 32
Latest version 1.2.0
Latest release date 2024-04-22 05:14:29
First release date 2022-01-24 03:48:17
Supported Unity versions 2018.4.2 or higher

Simple Unit Selection package suitable for games that require RTS style selection.

- enables single or multiple unit selection (more features below)

- short well documented code

- no-coding required for out-of-the-box use!

- extra customisation requires minimal coding (if you find feature missing that you'd like to see let me know!)

- short setup

- interface for extending the selection system

- interface for input system

- 2 selection examples included (2D and 3D)

- includes simple demo scene with no additional 3D models or other assets seen on previews!

*NEW*

- by default it will ignore interactions with visual elements on canvases (selection through buttons won't work, neither will it cancel current selection)


*NEW* Hover feature:

- move mouse over a unit to highlight it


Click and drag features:

- click on unit will select it

- drag mouse will select (highlight before mouse release) all units in selection area

- double mouse click to select all visible units


Shift hotkey features:

- shift+drag mouse will add all units in selection area to current selection

- shift+click on unit will toggle unit selection (select/deselect)


Configurations for features:

- adjustable number for maximal selected units

- option to disable maximum selection number

- option to disable mouse double click

- option to disable shift selection

- option to disable click on friendly, neutral and enemy units (units not owned by current player - usually used to get information about enemy unit)


Extra Quick Access (Hotkey) feature:

Component for quick access of units saved units:

- allows saving units selections with Ctrl+Hotkey

- allows quick selection of units using HotKey

- takes a list of HotKeys, defaults are numbers 0-9

- disable option (never add/or remove this component from prefab)


Selection Area prefabs

- 2D screen rectangle selection prefab

- 3D world cube selection prefab

These two prefabs use different visual and unit detection approaches.


Instructions (also shown in video):

- Drag and drop selection system prefab in the scene

- configure prefab components to your liking

- pick 2D or 3D type for selection area

- set required layer for detection (layer you will be using on selectable game objects)

- add SelectableUnit component on any units in scene you'd like to select (subclass component to add visual effects - Unit in demo scripts is a simple example)

And you're done!

Top Publisher Assets