- [Instructor] When creating a project in Unity, there are times when you may want to reuse assets and that is to be able to quickly populate a scene with some of their objects or something that you're going to be reusing several times. Now, the issue with just dragging and dropping a model, repeatedly throughout a scene, is that you have issues of things like draw calls or if you need to change those objects, you have to change and edit each one, individually. This is where prefabs come into play in Unity. So, prefab, just in it's most simplistic ways, is a collection of predefined component.
So, game objects and components that are reusable throughout your scene. So, you can reuse these elements throughout your project. Let's take a look at an example of some prefabs in here. So, if we go to the Standard Assets folder, that you brought in, and we can look at things like the first person character in here and there's a prefabs folder. So, the first person character control has in there, a number of different elements. I'm just going to drag and drop it into my hierarchy here. We're not going to do anything with it specifically but I'm just going to open it up and take a look at what it has.
So, what it has set-up in there is a bunch of different things that are all packed together, so I could reuse this throughout a scene if I wanted to. If we go out even further here, and take a look at something that we're going to be using quite a bit later, we can use this third person prefab and by clicking on this and opening this up, you can see that this prefab has a model in it. It also has a skeleton with rig information on it to animate this guy, and it has different pieces of components in there. As well with the prefab, it has access to everything related to it.
So, anything related to specific materials in there, or anything related to the specific animations or how that object or several components are going to work together. So, I'm just going to actually remove these guys from our scene in here. So, the basics of a prefab are that it's a way to reuse elements and it's a way to rapidly update elements throughout a scene. So, if I had for example, this barrel, I could populate the scene with a prefab of that barrel and change that barrel as needed, or maybe three variations of the barrels.
So, three prefabs and just make one change on each one and have a blue barrel, for example, or whatever it may be that I want to do. So, that's an overview of what a prefab is in Unity. We're going to take a look at how we can build them, how we can export and import them, and use them to build our scene as well.
Author
Released
1/4/2018- Setting up a Unity project
- Customizing the UI
- Navigating Unity
- Exporting and importing assets for Unity
- Creating and organizing new materials
- Creating, exporting, and importing prefabs
- Level building
- Creating and implementing animation
- Optimizing collisions
- Baking lighting
- Packaging your Unity project
Skill Level Beginner
Duration
Views
Related Courses
-
Cert Prep: Unity Fundamentals (2017)
with Alan Thorn1h 51m Intermediate -
Virtual Reality Foundations
with Craig Barr35m 18s Intermediate -
Learning Unity 2D Sprites
with Jesse Freeman54m 41s Beginner -
Unity 2017: Architectural Visualization
with Scott Onstott2h 21m Intermediate
-
Introduction
-
Welcome54s
-
Exercise files3m 37s
-
-
1. Setting Up the Unity Project
-
Project set-up overview3m 14s
-
-
2. Understanding the Unity Interface
-
Customizing the UI2m 59s
-
Navigating Unity9m 8s
-
Unity documentation2m 2s
-
3. Working with Assets
-
Exporting assets for Unity7m 11s
-
Importing assets into Unity6m 10s
-
4. Applying Materials
-
Introduction to materials3m 32s
-
Advanced custom materials14m 6s
-
-
5. Prefabs
-
What are prefabs?2m 30s
-
Importing prefabs1m 29s
-
Prefab instances and updates4m 25s
-
-
6. Level Building
-
Placing modular assets8m 19s
-
Roof and floor build7m 1s
-
Props and scene assembly8m 35s
-
-
7. Creating and Implementing Animation
-
Physics and rigid bodies7m 56s
-
Scripting and MonoDevelop4m 36s
-
8. Collisions
-
Unity collider components3m 22s
-
Applying colliders6m 57s
-
Optimizing collisions4m 40s
-
-
9. Adding Audio
-
Adding ambient sound9m 40s
-
The Unity audio mixer5m 33s
-
10. Unity Lighting
-
Introduction to lighting7m 13s
-
Light properties7m 39s
-
Environment lighting10m 16s
-
Animating a light5m 28s
-
-
11. Baking Lighting
-
Light probes5m 21s
-
Adding reflection probes5m 43s
-
12. Particles and FX in Unity
-
Ambient particles: Dust9m 10s
-
Creating steam effects11m 32s
-
Adding fog to the scene2m 14s
-
-
13. Post-Processing
-
Tone mapping6m 46s
-
Post-process effects6m 50s
-
Bloom and exposure4m 54s
-
14. Timeline: Creating Cinematics
-
The timeline editor5m 9s
-
Animating with timeline10m 16s
-
Audio and timeline2m 14s
-
Playtest the game sequence1m 46s
-
-
15. Packaging Your Unity Project
-
Game optimization tips3m 48s
-
Build and player settings2m 44s
-
Compiling a desktop build4m 15s
-
-
Conclusion
-
Next steps55s
-
- 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: What are prefabs?