Join Dan Violet Sagmiller for an in-depth discussion in this video Selection achitecture, part of Build a Real-Time Strategy Game with Unity 5.
- [Voiceover] We need a way to interact,…to select and deselect units.…It's very common to use a script to handle selection…and add that to every object that can interact,…but I don't want a hundred units checking to see…if they were clicked, every single frame.…To help performance and management,…we'll create an interaction manager.…To start with, in the Scripts folder,…I'm gonna create a script called "Interactive".…So Create > C# Script > "Interactive."…Next, I'm gonna create a folder called "Interactions."…Create > Folder > "Interactions".…
Inside of the Interactions folder,…I'll create a script called "Interaction."…Next, let's edit the code.…So an interaction will remain a MonoBehaviour,…but I want this to be an abstract class.…We'll have multiple types of classes…that can handle the interactions,…but there's methods that I want them to have.…This particular one has no use for the Start or Update,…so I'm going to remove those and replace it with…"public abstract void Select()"…and then also one for deselect.…
AuthorDan Violet Sagmiller
- Adding player positions and start info
- Loading prebuilt levels
- Adding camera moves
- Adding a unit
- Supporting navigation
- Adding unit owners and player objects
- Importing and setting up a HUD map
- Adding unit info and credits
- Creating HUD actions
- Building a command base
- Adding artificial intelligence
- Adding battle actions
Skill Level Intermediate
Unity 5: 2D Essential Training (2015)with Jesse Freeman3h 22m Intermediate
1. Initial Setup
2. Adding a Unit
3. Navigation Mesh
4. Unit Owner
5. HUD Map
6. Unit Info & Credits
7. HUD Actions
8. Command Base
9. Base AI
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.