Reputation: 859
I have a simple default button with text, it looks fine on Unity, but when I build it on my Android phone, I get a pink line instead of a button and no text on it. My button doesn't have any shaders (it's a default button without any changes on it besides a function).
I have no idea what causes it, it probably has something to do with shaders, but I don't use any.
Unity version: 5.5.2f1
Android: 6.0.1
Upvotes: 4
Views: 5277
Reputation: 125245
This is a bug but and are possible workaround:
1.The UI is likely missing its default shader. Re-add it from the Editor.
Go to Edit ---> Project Settings ---> Graphics ---> Built-in shader settings.
Change the Size to 7 then add each shader in there. Below is an image of what that should look like:
2.Disable 32-Bit Display Buffer
You can do that by going to
File ---> Build Settings, select Android then go to Player Settings ---> Resolution and Presentation then un-check the "Use 32-Bit Display Buffer" checkbox.
If this solves the problem, update Unity to the latest version (5.6) then go back to this settings and enable it back.
3.The Max Size of the Texture you use for the Button is too big. Reduce it to about 1024 or less. Most of the times there is no problem with 2048 but don't let the size be more than this on Android.
Upvotes: 9