Search Unity

Missing Object in WebGL

Discussion in 'Web' started by gregacuna, Jan 24, 2017.

  1. gregacuna

    gregacuna

    Joined:
    Jun 25, 2015
    Posts:
    59
    Something very strange happening in the WebGL build of our Acting Kindly Mobile game....

    We have a plane with a simple texture (shader: legacy/transparent/bump diffused) which flies into the scene facing right at the camera. In the editor and the Android version it is fine, but in the WebGL it cannot be seen. It doesn't seem to be a code problem as the SFX called right after the the plane game object is moved in is playing.

    Is there anything about WebGL which might do this with a plane object?

    Thanks!
     
  2. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    I have same problem, texture shows up when run in editor, but when compiled for WebGL and run in browser it doesnt show.
     
    Nishu1 likes this.
  3. gregacuna

    gregacuna

    Joined:
    Jun 25, 2015
    Posts:
    59
    Is it on a plane? What kind of testing have you done? I've attached a cube to the object so I can see it is flying into the scene and is in front of the camera...but not seen. Have tried changing the texture to another which is appearing in the scene, but that doesn't show up.

    More tests in the morning. I'll report back if I find out anything.
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Is there any error in the browser console log?

    Could you try to build for a different OpenGL ES 2 platform? maybe Android or Standalone (make sure you choose OpenGL ES2 in the Graphics API settings).
     
  5. gregacuna

    gregacuna

    Joined:
    Jun 25, 2015
    Posts:
    59
    Hey Marco...

    I'm using Playmaker and after trying several things I found that when trying to use the "Set Property" to "Active" it wasn't working so I ended up using the opposite and turning off the two images on planes which weren't supposed to show up. That solved it. Still, I'm really interested in understanding what's happening better so I'll try your suggestion on the old version of the project to see what happens when I us an OpenGL ES2 build for Android.

    Will report back as soon as I can.

    Thanks,
    Greg