Over 11,000 five-star assets
Rated by 85,000+ customers
Supported by 100,000+ forum members
Every asset moderated by Unity
Unity Version | Built-in | URP | HDRP |
---|---|---|---|
2020.3.21f1 | Compatible | Compatible | Compatible |
❗️Attention! This asset will no longer receive major updates as it has a successor, superior in customisation, overall functionality and performance. Link to the v2.0 is HERE.
🚀 Unit Selection package is 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!
🔧 Core features:
- Mouse Click: will select a unit
- Mouse Hover: will highlight unit
- Mouse Drag: will highlight and upon release select units within the selection area
- Mouse Double Click: will select all visible units in camera view
🎮 Modify current selection:
- Add units to selection: holding shift while dragging mouse will add all units current selection
- Toggle Unit selection: holding shift while clicking on unit will toggle unit selection (select/deselect)
⚙️ Configurations:
- Max selection: Adjust or disable maximal selected units
- Mouse Double Click: enable/disable
- Modify current selection: enable/disable
- Sort by distance: enable/disable
- Click on non player units: enable/disable
- Drag selection: enable/disable, while keeping click and hover functional
🔑 Extra Quick Access (Hotkey) feature:
Component for quick access of units saved units:
- Save Units: use Ctrl+Hotkey to save current selection
- Select Units: use HotKey to quickly select saved units
- Define Hotkeys: takes a list of keys, default are numbers 0-9
- Disable Feature: disable by flag or by removing component entirely
🔲 Selection Area prefabs
- 2D screen rectangle selection prefab: utilises screen position to detect units
- 3D world cube selection prefab: utilises bounds and collision detection types
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!
📭 Support Ready: Have a question or need help? Reach out via Email, Discord, or our Forum!
RTS Unit Selection
