- Home /
Textures are distorted when building for android
Hi,
I'm having a weird problem. Some (Not all) textures are getting distorted into lines when I build my project for Android.
Game when I build for a PC/MAC standalone:
Built for Android Gingerbread, Screenshot from the Android device I built to:
Any ideas what may be causing the problem? Textures are all the same resolution (128x128) and format (JPG).
Edit: In reply to previous posts, here's a screenshot of the new settings for my textures. They were previously set to: Max Size: 1024 Format: Compressed Wrap Mode: Repeat.
Now I have changed the settings to the ones indicated in the screenshot below. The result is exactly the same as before. Note - this is the texture that is being distorted, I removed all unused textures to make sure.
EDIT 2: Think I found the problem! Here's an interesting sample from adb logcat:
E/Unity ( 1699): findConfigAttrib (30e1): EGL error: 0x3004
E/Unity ( 1699): findConfigAttrib (30e1): EGL error: 0x3004
//Above line repeated many times...
E/Unity ( 1699): findConfigAttrib (30e1): EGL error: 0x3004
D/Unity ( 1699): Creating OpenGL ES 2.0 context (RGB16 565 16/0)
E/Unity ( 1699): Before eglCreateContext: EGL error: 0x3004
E/Unity ( 1699): Before eglCreateContext: EGL error: 0x3004
I/Unity ( 1699): onSurfaceCreated
I/Unity ( 1699): onSurfaceChanged 800x600
I/Unity ( 1699): view is 800x600
I/Unity ( 1699): initUnity
I/Unity ( 1699): glGetString (GL10.GL_VERSION)='OpenGL ES 2.0'
Do you have a solution for this? I'm having the same problem.
@hvilela Yeah. I downloaded a different version of unity and it worked. If you get exactly the same error it should work for you.
Which version are you using? I'm using the last one, 3.5.6.
3.4. Are you sure you have the same problem exactly (IE: Distorted textures with lines? If they just look stretched, check the compression values of each texture, that should fix it).
Exactly the same problem. For me it works fine for PC/Web/Editor/iPad2/iPad3 and it's reproduce able at Xoom and iPad1.
Answer by jemonsuarez · Oct 08, 2012 at 01:54 AM
Try testing different compression formats. I have smilar results in losing quality, but not such loss. Texture compression can be changed from texture properties, and from "build options" dialog. Your test could be very usefull.
@jemonsuarez I edited the question... I modified compression but get the same result. To be honest I had already tried this before :(
Answer by SarperS · Oct 08, 2012 at 01:52 AM
Make sure those textures' Clamp Mode are in Repeat mode instead of Clamp in the texture import settings.
@Sarper Soher Interesting... I set the Wrap mode to Clamp, and I get the "Android build" in Unity when I press play. It was already on repeat though... Very strange.
Your answer
Follow this Question
Related Questions
When does texture max-size override take effect? 1 Answer
Android tablet crashes depending on texture compression 0 Answers
Android: Preparing textures for 16-bit compression 1 Answer
A node in a childnode? 1 Answer
Android to unity INPUT 0 Answers