- Home /
2D game sprite visible in editor but gets unvisible in build
Okay so I'm really fustraited by now. I've tried EVERYTHING. So it works well in editor and in play mode as well, but as soon as i build the game it doesn't. I've tried it with other sprites, sorting layers, order in layer, rotation, layers, build settings,camera culling mask, everything. Can someone help me with this? Its just incredibly confusing that it works well in editor but not in the build.
Answer by LOSTSOUL86 · Dec 30, 2019 at 03:56 AM
I just want to add that I have the same problem with the text. Appears in play does not appear in build. Which version of unity do you have? Mine is 2017. I am thinking to update to 2019.
O$$anonymous$$ I will check it when I am back home but please keep me posted if you find the solution as I need to fix it. And vice versa I will let you know if I come up with something.
Hi I've found my mistake. Actually the problem was with the code itself. $$anonymous$$y objects suppose to appear on click and disappear on click. It worked fine with mouse because with mouse you can just click once very precisely, but with tapping on the phone it was detecting it not well. The objects appeared and disappeared in instant that's why they were not visible in build. I changed the code to detect tap and wait until tap is released it works well both in editor and build.
Oh well, tomorrow i'll give it a try as well then :) Thanks for the update anyway :D
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
How can I stop the variable values reverting to its default values after being built? 1 Answer
Character turns invisable on build 0 Answers
CommandInvokationFailure: Unable to convert classes into dex format 0 Answers
Android build failed error 1 Answer