Join Dan Violet Sagmiller for an in-depth discussion in this video Player start informaton, part of Build a Real-Time Strategy Game with Unity 5.
- [Voiceover] Now we need information…about the players in the game.…To do that I'm gonna create a couple classes…to store that data, a player class,…and it's gonna hold on to various fields about the player.…To do this, I'm gonna add a new folder…under the scripts called "Definitions".…So, Create > Folder > "Definitions".…In the Definitions folder, I'm gonna create…a new script called "PlayerSetupDefinition".…Create > C# Script > "PlayerSetupDefinition".…
Now let's edit this script, so first thing about this…is it's not gonna be a MonoBehaviour.…We aren't gonna be updating or changing any data…when it starts, we're just going to be using this…to store information from the IDE.…So let's get rid of MonoBehaviour,…which also means these two functions aren't gonna be needed.…Now the first thing, in order to make a class readable,…to make all these fields visible to the Inspector,…we need to make it serializable.…So, at the top, I'll be saying, in an attribute,…with the square bracket, "System.Serializable".…
Next, what types of fields and information…
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.