0
\$\begingroup\$

Everything works fine in the editor, but when I build the game, none of the objects in the scene are rendered, and only the skybox and UI text is visible. But although they aren't appearing, they are working as normally (i.e. these objects' triggers work normally when the determined event occurs, like for example, colliding to a specified object, or in other words, they are invisible).

I searched for this issue but didn't found any answer. Could it be my cheap computer's fault (Intel Celeron without an external graphics card)?


In editor game mode:

enter image description here

In buit game:

enter image description here

I ran both the editor and the built game in the same quality, and also tried to run it in Fastest quality, but no, it made no difference in the built game.

Also, there is no object tagged with "Editor only", only one have a custom tag and all the others are "Untagged". And the camera's culling mask is set to "Everything".

The result is the same either for web or Windows.


Edit:

OK, I built for Android and the objects render normally. So, I'm not completely sure, but probably it's my PC that can't render the objects, because both building for web plugin and desktop have this disappointing result, but for Android it works perfectly (even the shadows, which wasn't being cast in the editor), so...

\$\endgroup\$
7
  • \$\begingroup\$ Do u have multiple cameras?? \$\endgroup\$ Commented Feb 21, 2016 at 19:35
  • \$\begingroup\$ @HamzaHasan No, only one. \$\endgroup\$
    – Yuuza
    Commented Feb 21, 2016 at 19:36
  • \$\begingroup\$ Can you post the snapshot of your editor having all the settings visible with game and scene tab? \$\endgroup\$ Commented Feb 21, 2016 at 21:35
  • \$\begingroup\$ @HamzaHasan A screenshot of the entire Unity screen? \$\endgroup\$
    – Yuuza
    Commented Feb 21, 2016 at 21:43
  • \$\begingroup\$ Yes boy. entire screen with camera selected from hierarchy and its inspector should be readable \$\endgroup\$ Commented Feb 21, 2016 at 21:44

2 Answers 2

0
\$\begingroup\$

OMG!!!! It really worked :D The problem was shader, the default shader that unity provide for our game objects...Just change the shader from standard shader to legacy shader....then all of those game objects that were invisible will be visible :D Hope this works 4 ya :D

Cheers......

\$\endgroup\$
1
  • \$\begingroup\$ I can't believe the solution was so simple! It worked! Thanks! It's a bit uglier than the standard shader, but at least I can now see my objects. \$\endgroup\$
    – Yuuza
    Commented Apr 22, 2016 at 21:00
0
\$\begingroup\$

If anyone facing the same problem and as the OP said can do it but if you want to keep the same shader. Goto -> Project Settings -> Graphics -> Scroll down -> Find Tab "Always Included Shaders" -> add your shaders there which were not visibleVisual Guide

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Shaders referenced in a scene or via a prefab/asset reference should be included automatically during the build process. If they're not being included, that could mean that you're spawning these objects or applying their materials in a way that hides their dependency on this shader from Unity's build system. Any idea what might be throwing it off? \$\endgroup\$
    – DMGregory
    Commented Dec 27, 2023 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .