#Problem with Destoy(gameObject)
1 messages · Page 1 of 1 (latest)
Just means something in your scene is still trying to reference it. In the error it should list out in blue what is causing the error. Mind posting the error message in full?
Also if you have a lot of things that need to spawn and despawn in the scene it's good practice to use a pooling system. Essentially just disabling and reenabling objects instead of deleting and instantiating them.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Here is a pooler I made that I use in just about every project. Slap it on a single gameobject in your scene. Then in code call Pooler.SpawnObject(obj, location) from anywhere
im honestly pretty new to unity so im triying to learn all the basics before going into more complicated stuff
If you click on your "Console" next to the "Project" tab, you can see the errors in more detail, double-clicking those errors should open Visual Studio (or whatever your IDE is) and jump to the line producing the error - the error itself should tell you more information about the script and line of code causing the issue