- Home /
Why would a GameObject delete itself.
I have a GameObject that is deleting itself almost immediately on run-time. I stepped through the debugger for the start up functions and couldn't find anything causing the Object to delete itself.
The Object is a subscene that contains the menu for my achievements, using this plugin for making subscenes. None of the other subscenes delete themselves. This scene was working fine until I got the Steamworks integration working.
So my biggest problem is trying to find what is causing the GameObject to delete itself. Can I run the debugger while telling it to catch anything deleting itself?
I don't have a solution for you, but just wanted to let you know that you're not crazy! The same thing is happening to me right now. The only thing I did was install the Reign plugin. Very frustrating, but the only thing that helped me was rolling back to the previous version of my .scene file. Luckily my work is version controlled.
I think it might have something to do with a cleanup script I run for the reign plugin. The diffs between my good scene and bad scene show different GUIDs. That's about all.
I see this too. I am using Procedure lightning asset for lightning bolts. The LightningsabrePrefab is deleting from hierarchy in runtime at random moments. $$anonymous$$y thinking is there is an overrun of memory problem somewhere in the process that causes the gameobject to drop out of the game all together. The asset is still there when I quit runtime and go back to editor. How do I use unity to track the underpinnings of the runtime processes and find where the drop out is? I use other assets and have not had this problem.
well it should give you an error for running out of memory, try adding a OnDestroy event and check when this is happening
Perfect! Now I need a stack trace or list of previous events or some kind of memory dump. How is this obtained? Thanks for the answers!