Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Hemaolle · Sep 14, 2013 at 04:42 PM · androidmaterialsmissingrandomly

Materials disappear randomly on Android

I have a problem with the Android version of my game, where some materials or textures don't appear in a scene. This happens completely randomly: when I build the game again without changing anything, it's some other materials that are missing. And the gameobjects don't show a magenta material, they just don't show at all as though they had completely transparent material. It looks like that the missing materials are dependent on the particular build: the same materials are always missing in the same scenes even if I reload the scenes.

The shaders I'm using are Particles/Alpha Blended (the game is a 2D game).

Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Hemaolle · Sep 14, 2013 at 06:14 PM 0
Share

I might also add that I'm not getting any exceptions.

avatar image supernat · Sep 15, 2013 at 05:29 AM 0
Share

What android device are you exporting to? What version of Open GL? I recently discovered bugs in an app that were caused on newer devices (specifically Adreno 225 GPUs) if they ran with GL ES 1.1 or older. Although they should be backward compatible, I seriously doubt they tested with that version. Textures were missing, just white in their place. The problem went away by moving to GL ES 2.0. It doesn't explain why you would see differences after a build.

avatar image Hemaolle · Sep 15, 2013 at 07:12 AM 0
Share

After more testing I have now noticed that I was mistaken about the missing materials being dependent on the build or being always the same even during a single run of the game.

It seems that in the first 2-3 loaded scenes everything looks fine but then some materials start to disappear. I'm starting to think that it might be an issue of running out of memory since I use pretty many big (2024x2024) unpacked textures as pixel perfect sprite sheets. But I don't get why materials loaded in previous scenes won't get unloaded.

avatar image Hemaolle · Sep 15, 2013 at 07:48 AM 0
Share

And answering to supernat's questions:

The device is Samsung Galaxy S Plus (GT-I9001). And I'm using OpenGL ES 2.0 already.

avatar image Hemaolle · Sep 15, 2013 at 08:07 AM 0
Share

I resized all my textures from 2048x2048 to 512x512 and no textures seemed to go missing anymore. I just wonder why it seems like unused resources aren't unloaded when a new level is loaded. I even tried adding Reources.UnloadUnusedAssets() to start of every level but it didn't help (and somebody told that loading levels should call this anyway http://answers.unity3d.com/questions/163434/unloading-unused-assets-automatically.html). It would be great to be able to use the current textures, resizing them might be quite a lot of work.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Hemaolle · Sep 15, 2013 at 08:54 AM

All right, now I seem to have found a good solution. It was changing the texture format from texture import settings from ARGB 32 bit to Automatic Compressed. The quality seems pretty good still and no textures disappear any more.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Hemaolle · Oct 02, 2013 at 05:27 AM 0
Share

Later I managed to find an even better solution where I manually unloaded the textures using Resources.UnloadAsset(texture). After this I didn't even need to compress them.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

unity 4.6 input, missing touches 0 Answers

Material appear in pink when loaded from assetbundle in Android 0 Answers

Static Objects and and terrain detail turn white upon opening scene? 0 Answers

How to use 3rd Party Shader with LWRP / URP 1 Answer

Specular Materials on iPhone or Android? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges