Game Object visible in Scene mode but not visible in Game mode.

Right after I applied Object pooling for the obstacles and made the obstacles to a Prefab it’s no longer showing in Game mode but it’s visible in Scene mode.
Any help would be appreciated.

Hello there,

My first guess is that they get instantiated behind the background. Once instantiated, try selecting them in the scene and change their Z values.

Another cause could be Layers. If you’ve grouped your enemies/obstacles under a specific layer, make sure your camera is rendering them (Camera → Culling Mask).

Other than that, I think you could try giving a little more info if you want more answers. Like your instantiation/pooling code, your setup in the scene hierarchy, etc…


I hope that helps!

Cheers,

~LegendBacon

I found the solution. I played with the z axis, set the position to zero therefore it’s working now. Thanks for the help . It was a silly mistake.