- Home /
Some GameObjects not visible in android build but work fine in the editor?
Hi,
Im having a problem where certain gameobjects or prefabs are invisible on my android device but work perfectly fine in the editor. The invisible objects still work as they are supposed to in the build but you just can't see them, like they are not being rendered?
This was not a problem in previous builds of my app as the objects used to work and look fine. Battling to figure out what has gone wrong as I haven't touch these problem objects since previous builds where the worked fine. The gameobjects are imported FBX files from maya that share a vertex-lit shader and texture atlas.
This is a List of things I have ruled out as a possible cause.
Tags set to editor only.
Default layer set to not visible.
Mesh renderer deselected.
The shader they share are also used by other gameObjects that still work fine.
Tried replacing the FBX files.
Reinstalled Unity.
Updated android SDK.
I did a quick windows Desktop build of the app as a test and everything works fine there so something is happening with the android build.
Im using Unity 5.0.1f on windows 8.1 and my divice im testing on is a Sony Xperia running Lollipop 5.0.2.
Note: I think this problem might have started when I upgraded from Unity 5 to 5.0.1f and then uninstalled Unity 4.6 which I had installed alongside Unity 5. Gonna try the latest patch release and if that doesnt work go back to Unity 5 and see if that helps.
Answer by RyanJVR · Apr 23, 2015 at 09:09 PM
Ok, everything is working again. I installed Unity patch release 5.0.1p1 and that seems to have solved the problem.
I still have this issue even with the update. I'm using NGUI and a gameObject is not visible on mobile, only in the Editor...I've checked the layers...everything and can't seem to fix this. Any other hints?
Hi imDJ$$anonymous$$,
Sorry for the late reply. I don't know what could be causing your problem as I have never used NGUI but I remember co$$anonymous$$g across this thread when trying to solve my problem, maybe its relevant to you. http://answers.unity3d.com/questions/237331/gameobjects-missing-when-using-build-run.html
hope it helps. Ryan
ThanksRyan...I had some depth issues. I'm new with NGUI and Unity. Thanks for answering and your link is most useful for me. Cheers