Тёмный

How to Spawn and Destroy Objects in Unity: The Complete Guide 

Kory Code
Подписаться 521
Просмотров 9 тыс.
50% 1

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@ianrodriguez4990
@ianrodriguez4990 2 года назад
Like the guy. You got a subbed. Never change how you do your intros.
@KoryCode
@KoryCode 2 года назад
Thanks for the sub and the feedback! 😃 I try to keep the intro brief and on the point.
@mybusinessnotyours2051
@mybusinessnotyours2051 2 года назад
Subbed, like what you are doing! Look forward to more, just decided to get serious about trying some unity. Been programming Wpf C# applications, and Mongo db. Ready for something fun!
@KoryCode
@KoryCode 2 года назад
Welcome aboard! Unity is a tons of fun! What kind of game are you interested to do? 2D or 3D? I already working on the next video. What kind of topic you would like to see a video about? Please, let me know! :)
@crispyo5287
@crispyo5287 Год назад
Thank you this is exacly what i needed!
@KoryCode
@KoryCode Год назад
Happy to help!
@sergeykizin6101
@sergeykizin6101 Год назад
thank you man
@KoryCode
@KoryCode Год назад
You're welcome! 🙂
@RockSoldier86
@RockSoldier86 2 года назад
WHY IS IT ONLY 16 LIKES???😢
@KoryCode
@KoryCode 2 года назад
I'm happy you liked it! 🙂
@christopheralbahou8081
@christopheralbahou8081 2 года назад
100th sub!!!
@KoryCode
@KoryCode 2 года назад
Thank You, and Congratulation! 🎉🎊
@lucky6961
@lucky6961 Год назад
hey, what about an static item, like some kind of particle, how can I make it so it deletes the object?
@KoryCode
@KoryCode Год назад
It could be anything as long there is a collider on your static object or even on a particle.
@Trollholetoll
@Trollholetoll 2 года назад
was there something I was supposed to supposed to do before writing this script? I followed the video from the start but my spawning does not have Time.time being colored like yours, mine is just plain white text same some other things in my script
@KoryCode
@KoryCode 2 года назад
No this should work. Do you get an error from unity? Or just your IDE not highlights the line? I use visual studio and I have some unity related extensions. Just click the extensions icon on your visual studio and search for unity.
@vishumudgal
@vishumudgal Год назад
Your videos are boon for beginners like me. I have a doubt if you can help me out. I am trying to change the player prefab every X seconds. For that, I am destroying the previously spawned prefab and instantiating a new prefab. But I don't know how to DESTROY THE PREFAB(not the empty game object on which the script is attached) when i use Destroy(gameobject) in my code, it destroys the empty game object which stores the list of 5 prefabs. How can i destroy previously spawned prefab??
@KoryCode
@KoryCode Год назад
I will have a few questions, first. What is the reason to destroy the player every x seconds? Usually we would destroy the instantiated copy of the prefabs, aka the destroy script would be on the prefab not on the parent GameObject. You probably could just disable the Player Prefab instead of destroying it or even use object pooling. If you hop on to my discord I'm happy to help. You find the link in the top right corner on my channel page.
@KoryCode
@KoryCode Год назад
You also can store a reference of the prefab in a variable, for example: playerClone = Instantiate(player, transform.position, transform.rotation); than you can do. Destroy(playerClone);
@KoryCode
@KoryCode Год назад
If you are interested to sign up for a free coaching session with me click the link bellow: 1dpz0wt3869.typeform.com/to/kiZ2kLxY
Далее
I Made The Ultimate Cheating Device
9:39
Просмотров 546 тыс.
Добрая весть 😂
00:21
Просмотров 536 тыс.
For my passenger princess ❤️ #tiktok #elsarca
00:24
How To SPAWN ANYTHING in your Game with Unity Tutorial
10:45
Spawning Objects in Unity [Using Instantiate]
10:23
Просмотров 240 тыс.
How to Prevent Spawn Overlap in Unity
14:20
Просмотров 32 тыс.
Unity3d Creating a Timed Spawner
8:20
Просмотров 80 тыс.
How Games Have Worked for 30 Years to Do Less Work
23:40
How to ACTUALLY get into Gamedev
14:01
Просмотров 724 тыс.