Problem
Today when I testing the developed game, the Unity Main Camera suddenly cloud not capture any game objects. However, if I open another project, Main Camera can work normally.
It means that the problem is my project settings, not a bug in the Unity editor.
According to the method I found, it was finally solved after actual measurement. The possible problems are recorded as follows:
- Object is hidden
- The Clipping Planes value of the camera is incorrect (My case)
Solution
Situation One: Object is hidden
Check whether there is a check before the object name in the Inspector; if it is unchecked, the object is not visible.
![](https://i0.wp.com/clay-atlas.com/wp-content/uploads/2021/06/image-7.png?resize=1024%2C436&ssl=1)
Example:
![](https://i0.wp.com/clay-atlas.com/wp-content/uploads/2021/06/image-9.png?resize=1024%2C431&ssl=1)
Situation Two: The Clipping Planes value of the camera is incorrect
Run the game on test mode and adjust the Clipping Planes value of Main Camera until the game object is visible.
![](https://i0.wp.com/clay-atlas.com/wp-content/uploads/2021/06/image-10.png?resize=462%2C495&ssl=1)
The above is the introduction of how to solve the Unity Main Camera cannot capture game object.
References
- https://stackoverflow.com/questions/28469186/game-object-appears-in-scene-view-but-not-in-game-view
- https://answers.unity.com/questions/904874/camera-not-displaying-any-gameobjects-in-scene.html