- Home /
The question is answered, right answer was accepted
GameObjects missing from compiled game
A number of GameObjects are missing from the compiled version of my game. They are there in the editor, and they are there when I run the game from the editor. They seem to be GameObjects that were added in the last few weeks - all the earlier ones are present.
I get the game to list all the GameObjects in the scene using:
foreach (GameObject go in Resources.FindObjectsOfTypeAll<GameObject>())
Debug.Log(go.name);
The GameObjects are listed when it's run from the editor, but a number are missing when run from a windows executable.
Does anyone have any idea why this might be or where I should start looking?
Answer by Mr-Men · Mar 31, 2019 at 08:31 AM
Ah, so somehow I've fixed it. I tried a number of things - created a new scene, rename objects, created new objects. Nothing seemed to work.
But then I removed every Unity thing from the project folder - all folders and files - except the scene and Assets folder and loaded it into unity again. I then had to reload the Post Processing package, removed some default packages that I don't want and completed the post processing volume and layer parameters. It then worked. But I'm at a loss to why.
tldr; I made it work but not sure just what I did :-/
@pako, I should have been more explicit - the missing GameObjects were all from the only scene in the game.
Follow this Question
Related Questions
Help, Missing Object 1 Answer
missing gameobject ≠ Null? 1 Answer
When removing something from a list it says missing 1 Answer
GameObjet.find give "Missing" 1 Answer
Can't copy Gameobject into array, only refer to an existing one. 1 Answer