Unity 2D Game Design Tutorial 6 - Prefabs

Unity 2D Game Design Tutorial 6 - Prefabs

Daniel Wood

7 лет назад

57,757 Просмотров

This tutorial explains how to create prefabs for 2D game design in Unity. Prefabs are useful when you have assets that you want to reuse throughout your game.

Тэги:

#unity #2d #game #design #development #tutorial #prefabs #prefab #reusable #assets #project #scene
Ссылки и html тэги не поддерживаются


Комментарии:

Nathan
Nathan - 09.05.2023 01:41

I have an issue. I made a working enemy ai. But when I make it a prefab, the prefab squishes everything in the project window preview. Looks fine dragged in editor. However if I spawn it via a script, it looks like squished like the preview in game.

Ответить
techmaster90
techmaster90 - 28.11.2022 21:51

Do I need to name the folder Prefab to make the sprite a prefab? or does simply draging and droping the sprite into the assets folder turn it into a prefab? Also why doesn't the sprite become a prefab when I drag it into the Assets folder from my image file outside of unity(in other words when i first import it?).

Ответить
David Tourangeau
David Tourangeau - 15.04.2021 16:36

You Sir, deserve more likes

Ответить
Kipitrash
Kipitrash - 15.03.2021 04:25

Hey, I have my project structured with "Canvas" inside my main camera. When I drag a new object into the game scene, I can't see it because it is being created outside the Canvas directory where the rest of my project is (I think everything is on top of it?). Is there a way to set my prefabs to go to Canvas instead of outside the main camera?

Ответить
Стилиян Батинков
Стилиян Батинков - 15.12.2020 15:38

Da te eba shto izpolvash macbook jeno mrusna

Ответить
Xavier Iaya
Xavier Iaya - 21.11.2020 00:57

So I can just CTRL+D to duplicate the assets or any game object it has the same physical futures and it works.

Ответить
N
N - 21.11.2020 00:32

greatly helpful content, only problem is difficult to get accent.

Ответить
Peachy
Peachy - 20.11.2020 03:14

2019/2020 UPDATE FOR THE APPLY BUTTON: Go to overrides > Apply All :).

For some reason rotating the object wasn't enough to apply to the prefabs ,but if you resize it or do some other type of change you can apply that. But yeah just rotating it I didn't see the Apply button.

Ответить
Marvelous_LXVII
Marvelous_LXVII - 13.08.2020 04:24

Awesome video! Thanks! Getting into Unity this really helped me.

Ответить
Juan Chavez
Juan Chavez - 31.07.2020 19:07

you put so much effort in making sure that we understand these videos deserves more likes.

Ответить
AkrimHannahLunaGinny
AkrimHannahLunaGinny - 12.04.2020 13:29

this video could not be any longer :D, but u eventually made your point and explained the problematics, so thumbs up for that :-)

Ответить
Spring Sino
Spring Sino - 16.03.2020 19:52

isn't more faster using ctrl D ?

Ответить
Mihai Crisan
Mihai Crisan - 26.01.2020 12:21

No apply button in inspector panel

Ответить
DasEvoli
DasEvoli - 11.07.2019 02:46

Thank you for your tutorial. But it doesn't explain why we can't just duplicate the Gameobject

Ответить
Adawiyah Abd Jalil
Adawiyah Abd Jalil - 27.02.2019 07:00

Sir... there's no apply button in inspector panel, why?

Ответить
Brian Laudrup Channel
Brian Laudrup Channel - 10.02.2019 00:26

so far soo good. Just wondering now when user input comes into play

Ответить
Vikrama Raghuraman
Vikrama Raghuraman - 28.10.2018 18:49

nice one sir

Ответить
Aidan Beattie
Aidan Beattie - 09.11.2017 05:51

Very helpful

Ответить