
Control Units and Give Orders! (Unity RTS Tutorial)
✅ Get the Project files and Utilities at https://unitycodemonkey.com/video.php?v=mCIkCXz9mxI
Let's make a Simple RTS Control System to Select our Units and Give Orders.
This is a great base for you to expand upon, add more actions, different types of units, etc.
Stay tuned for an upcoming video covering how to make Custom Animated Cursors so we can make the game look better and give the player more context.
Control Units and Give Orders in Unity ECS!
https://www.youtube.com/watch?v=3Xjc7NjL0Gc
Modular Character System in Unity
https://www.youtube.com/watch?v=mJRc9kLxFSk
Patreon Sponsor: https://www.badadventurer.com/
We're going to start off with a basic Unit standing Idle.
First we capture the Mouse Down and Mouse Up events and store the Mouse World Position, using that we can then use Physics2D.OverlapAreaAll which returns all the Colliders within two points
Then we create a script to identify our Units and ignore objects like Rocks. We add a Visual for the Unit Selection and the Selection Area.
After that we add the ability to give our Unit a simple Move Order. The Unit is handled by the Modular Character System created in a previous video so we can easily add some move behaviour.
With the Units receiving orders then we dynamically generate some positions around the Target Move Position and send each unit to a different position in order to prevent overlapping.
And with that the RTS Control System is done!
You can use this as a base for your RTS Games and Expand upon it by adding more actions and behaviours like Attacking Enemies, Constructing Buildings, Gathering Resources and so on!
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1
See you next time!
📍 Support on Patreon https://www.patreon.com/unitycodemonkey
🤖 Join the Community Discord https://discord.gg/eHjUVrm
📦 Grab the Game Bundle at https://unitycodemonkey.com/gameBundle.php
📝 Get the Code Monkey Utilities at https://unitycodemonkey.com/utils.php
#unitytutorial #unity3d #unity2d
--------------------------------------------------------------------
Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.
I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Website: https://unitycodemonkey.com/
- Twitter: https://twitter.com/UnityCodeMonkey
- Facebook: https://www.facebook.com/UnityCodeMonkey/