Everything is pink on build

Hi!

This week I’ve been working on porting our PC game to LumePad. Everything was working fine until I added the Leia Unity Plugin. When setting up a camera and the LeiaDisplay, in the Editor it worked fine. But, when I built it, everything (except UI) was pink. I thought it was my thing so I exported the “LeiaLogo” example scene, but same issue. So it has to be something regarding the whole project, not only that scene.

The game works but nothing except the UI can be seen, but I can move around, open menus ,etc. It has to be a shader error, but I don’t know how to solve this. In Player settings, the Graphic API is set to sRGB.

If you have any idea on how to solve this, much appreciated!
Thanks :smiley:

Carlos

Hi Carlos,

There is a bug with the Unity Editor where Shader resources that the LeiaLoft Unity SDK needs, will sometimes not be included in builds. This is the most common cause of a fullscreen pink material issue. Can you try “Reimport all” in the Unity Editor and see if that resolves the fullscreen pink material issue?

If that does not resolve the issue, can you share the first few lines of Android device bridge’s output when playing the game? Something like

< cd to Android SDK platform-tools directory, e.g. /Applications/Unity/Hub/Editor/2019.1.6f1/PlaybackEngines/AndroidPlayer/SDK/platform-tools >
./adb logcat -c
./adb logcat Unity:I *:S > result.txt
< start the broken app >
< stop the broken app >
< share the first few lines of result.txt to this forum>
2 Likes

Hi john!

Thanks for your help, the issue is solved.

I tried reimporting all, but did nothing. When I was trying the adb logcat, adb wasn’t recognising the device. I didn’t know that I had to set the tablet in “Debug Mode”, as I’ve never ported to Android. So after fixing that, and doing “Build and Run”, Unity showed errors that were not appearing before.

The cause of everything is that I imported the Leia asset to a custom folder “Assets/Plugins”, and the path to the cginc in the shaders was wrong.

Thanks for your quick help!
Carlos

Aha! Thanks, we’ll keep in mind that the cginc vs Asset path of the Unity SDK can cause errors.