Unity RTS - Box Selection Tutorial

Unity RTS - Box Selection Tutorial

Channel:
Subscribers:
9,890
Published on ● Video Link: https://www.youtube.com/watch?v=OL1QgwaDsqo



Category:
Tutorial
Duration: 14:39
48,299 views
745


Check out my current game project!
https://www.youtube.com/watch?v=LKMhKuCSNiY

Intermediate-level RTS tutorial for selecting multiple units with a box.

All code available here:
https://github.com/pickles976/RTS_selection/blob/master/README.md

Unfortunately the blog that I stole the UI code from has 404'd

I know there are a lot of tutorials for this type of RTS-style selection in Unity already out there, but most of them require either an orthographic perspective, or they require looping through every single object in the scene to check if they are inside of the bounding box. Those solutions, while simple, seemed too limited to me. What if you have hundreds or thousands of objects in the scene? This type of selection method would not be able to scale well for games with large numbers of units (with modern CPU's it probably doesn't matter all that much tbh). So this is my collider-based solution.

Song: https://www.youtube.com/watch?v=z0aCVCLdd1s
Anime song: https://www.youtube.com/watch?v=bCodVbucTbo







Tags:
unity
rts
tutorial
drag
selection
box
marquee
select
box select
drag-select
drag select
multiple select
real time strategy
game development