UI not working after build
HI, I have problem with UI. When I play game in Unity everything works properly, but after I build game and turn on camera with UI everything breaks down. Canvas in some frames turns off, it bekomes invisible, Raw Image with RenderTexture change into broken texture (black texture with some numbers, i think), buttons texture in some framse becomes invisible, objects with text crashes (i don't know how, i just can see in some frames that i couldn't read that text). And finaly (in random frame when UI is on screen) game crashes with error 0xc0000005 (Read from location 45cb4f9c caused an access violation.) That location was never the same.
I read something about that error and i find solution which don't help me. In GraphicsSettings i must have some "Always Included Shaders" but i have 6 of them which must be included. Then i tried include some shaders which i think could help, but i was wrong and all canvas after build changed into pink texture. So can you help me which shaders should i include for UI? Because i'm sure the problem is in UI because game crashes only when some UI is on.
Answer by JamesLawrenceMyQVO · Jul 19, 2016 at 07:29 PM
It sounds like you are having some memory problems. Is the build for a mobile device? Also how are you using the RenderTexture? What does the UI that it crashes during have attached to it, including scripts?
I'm not sure about memory problems because in error log i have 20-40% memory used. I thing it must be nearly 100% to memory problem? I tried to find a problem, and i think it colud be too many buttons, because when i turn some of them off everything works fine. But... i have just about 30 buttons, one raw image, one image, 10 texts. It's not a lot. In other devices are same problem, so i think there must be something with UI. And this is for PC, Windows. Not mobile device. The UI do... nothing. I tried turn off script so UI do nothing but game still crashes. I use RenderTexture properly... i think. Camera to RenderTexture (500x500), in canvas i have raw image with that texture. But i tried turn off everything from canvas and i left just only background and rawImage with RenderTexture and it works. In fact i think that is not just shader problem so i post about this problem here: link text
There is all what i have done in 8 hours for finding problem and i attached there error logs.