Certain GameObjects only appear on Hierarchy after build

So there are gameobjects in my hierarchy, but when I press play more gameobjects appear which I am not able to modify when I stop which I wish to do. Is this the work of a script or a plugin? Thanks!

Definitely. Probably a script.

That behavior matches what happens if you create any GameObjects with Instantiate in one of your scripts at runtime. What kind of object is it? It seems strange to me that you’re not aware of the source of these objects, as most likely you would have added it yourself.

2 Likes

Hi @charu ,

As @PraetorBlue mentioned, this is happening when a call to the Instantiate method is called.

You can find more information about such a method here: Unity - Scripting API: Object.Instantiate

What you can do is to search inside of the IDE (script editor) that you’re using where Instantiate is being called on the project scrpits and set breakpoints to find which one is being called.

After finding the right place in the code, you can then modify your gameObjects there or in a different script to fit your needs.

I hope this helps!

2 Likes

Thank you very much!

1 Like