Join Michael House for an in-depth discussion in this video An advanced prefab system, part of Advanced Unity: 3D Game Programming.
…In a previous video, I introduced a…simple prefab system for defining our own prefabs.…In this video I'm going to show you a more advanced system.…This system will utilize reflection heavily.…Reflection is essentially a method for allowing…a program to access information about itself.…This means we can access method names, fields and properties.…For this example, we're most interested in fields,…since that's what we'll be defining in our scripts.…Additionally, this pre-fab system has a more sophisticated parser called a Lexer.…
The lexer performs lexical analysis similar to how compilers read code.…Finally, we'll use field attributes to find which…fields we want to acquire a value for.…Let's take a look at a sample script.…This sample script syntax is a component…enclosed in square brackets with open curly bracket…and close curly bracket and inside, we want to add all of our component data.…So this movement component has three…fields, top speed, turning radius and acceleration.…And this fields will match up to a…
Author
Released
6/10/2014NOTE: This course requires Unity 4.5.5. The newer versions of Unity have done away with the GUI system used in this course, so the interfaces included for many of the scenes will not work with 4.6 and higher. You can download Unity 4.5.5 at http://unity3d.com/get-unity/download/archive.
- Enabling/disabling with scripts
- Translating, rotating, and scaling objects with scripts
- Working with mouse and keyboard input
- Debugging
- Creating custom GUI controls like progress bars
- Loading assets with scripts
- Saving games
- Creating prefabs dynamically
- Making remote procedure calls
- Synchronizing object transforms
- Finding slow code
- Optimizing data access
- Extending the editor
Skill Level Advanced
Duration
Views
Q: In the Chapter 3 file EntityLoader.cs, I get an error: DirectoryNotFoundException: Directory 'Assets\' not found. Removing the backslash after 'Assets' fixes it, but then I run into a different error. How do I fix this?
Q: What version of Unity does this course cover?
A: This course requires Unity 4.5.5. The newer versions of Unity have done away with the GUI system used in this course, so the interfaces included for many of the scenes will not work with 4.6 and higher. You can download Unity 4.5.5 at http://unity3d.com/get-unity/download/archive.
Q: The game object in the first chapter's Mouse Input Raycasting sample doesn't appear to follow the mouse. What's wrong?
A: Please enable the Box Collider component (by activating the checkbox next to the component name) on the game object. This is not explicitly mentioned in the video, but it will ensure the raycasts collide with the game object.
Related Courses
-
Animating Characters with Mecanim in Unity 3D
with Sue Blackman5h 28m Intermediate -
Unity 3D: 3.5 Essential Training
with Sue Blackman10h 52m Beginner -
Animating for Unity 3D in 3ds Max
with Adam Crespi1h 19m Intermediate -
Unity: Level Design
with Adam Crespi3h 9m Intermediate
-
Introduction
-
Welcome37s
-
-
1. Basic Scripting
-
How scripts work in Unity3m 23s
-
Your first script2m 36s
-
Updates and Delta Time3m 5s
-
Translate, rotate, and scale6m 45s
-
Keyboard input4m 37s
-
Mouse input5m 33s
-
Combining the basics2m 36s
-
-
2. Using the Debugger
-
Debugging5m 49s
-
The Call Stack4m 48s
-
The Immediate window3m 28s
-
Logging exceptions3m 57s
-
-
3. Prefabs
-
An advanced prefab system6m 12s
-
4. Advanced Scripting
-
Coroutines3m 45s
-
Events and messaging systems7m 25s
-
Saving and loading games5m 33s
-
Ray casting5m 48s
-
Mini maps2m 52s
-
Quadtrees5m 58s
-
Extension methods2m 37s
-
-
5. Dynamic Terrain
-
Procedural voxel terrain5m 39s
-
Chunked infinite terrain4m 28s
-
Modifiable voxel terrain4m 41s
-
-
6. Creating Custom GUI Controls
-
Combo boxes4m 11s
-
Rotatable GUI items3m 12s
-
Progress bars4m 33s
-
Tables5m 22s
-
Message windows6m 4s
-
-
7. Networking
-
Master servers4m 15s
-
Getting connected4m 6s
-
Remote procedure calls3m 22s
-
Simple chat clients4m 29s
-
-
8. Optimization
-
Finding slow code7m 6s
-
Nearest-neighbor search5m 11s
-
Object pools4m 14s
-
Update() overuse4m 29s
-
-
9. Extending the Editor
-
Property drawers4m 26s
-
Custom editor elements3m 12s
-
Editor windows3m 19s
-
-
Conclusion
-
Next steps41s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: An advanced prefab system