Introduction to Game Development (E11: prefabs and instantiation)

preview_player
Показать описание
Welcome to episode eleven of this introduction to game development in Unity with C#.

In this episode we look at prefabs, and how to instantiate them into the game world through script.

Project files:

Or a once-off donation through PayPal:
Рекомендации по теме
Комментарии
Автор

I love your tutorials. They are fast, but very informative. They are very well suited for YouTube, given that we (viewers) can just pause if we need to :)

ashrasmun
Автор

"This master chair is now saved in our project" BLISS TO MY EARS

octopusman
Автор

I would say you are the best in youtube for teaching unity to others. Not a lot of people spend time like you to go in specific details like this. I have learned more on this channel then reading Unity books. Thanks Sebastian!

andylee
Автор

Came back from the E15 to check if i liked all the previous videos.
Man! You are such a passionate teacher. The way you teach make me learn more, more and more.

mmkamal
Автор

Reviewing this tutorial helped me fix an issue I was having with prefabs that had cost me multiple hours. Much appreciated!

RenegadePawn
Автор

not even halfway done and already learned so much from this series. thank you very much!

julianserry
Автор

Hey Sebastian! Just wanted to say thanks for this excellent series. I've been following along and learning a lot quicker than I thought I could.

softmoneyy
Автор

This looks like your make a game series step by step so everyone can understand thanks a lot :D

albipig
Автор

Wow I thought I knew all there is to prefabs but no I learnt so much Thankyou very much

coolandfresh
Автор

I love these so much, thank you. I kinda understand this stuff by reading it on unity's website, but these videos make me understand it so much better so that I know what I'm actually doing

JordyAuto
Автор

Out of curiosity. You set up a variable to hold the chair prefab at the top of the script but how would you assign the prefab programmatically rather then dragging the prefab onto the script in the editor?

kevmscotland
Автор

To prevent chairs from spawning on top of each other, you can replace the y component of the vector in line 17 with an arbitrary number (I found out that 5f works very well in this case) so that chairs don't spawn on the ground and add Rigidbody, Mesh Renderer nd Box Collider components to the chair prefab so that chairs collide with each other and with the Plane.

zdenkorupcic
Автор

You're a genius Sebastian really thanks a

HB-wkzj
Автор

Until next time, chairs. :D
Thanks for all the wonderful tutorials!

howpickname
Автор

What's the difference between casting using (GameObject) or adding "As GameObject" at the end of the Instantiate call?

ozzypig
Автор

this helps me a lot, thank you very much

lazxxxy
Автор

keep them coming! I'm loving this.

ThiagoBorgesCampos
Автор

for those also going along: him child'ing all the chair pieces into a blank object is kind of important, as otherwise you end up with weird issues if you try to rotate or tilt any pieces (such as the back of the chair)

leafgreenbeast
Автор

Hello Sebastian,
when do you plan to release next part of procedural landmass generation? I really can't wait for it :)

wiedzmin
Автор

6:40 I tought he said until next time chairs. 😂

fodk