2D Toolkit Forum

2D Toolkit => Support => Topic started by: willeml85 on July 06, 2013, 08:34:20 am

Title: Android disappearing graphics on 2nd boot.
Post by: willeml85 on July 06, 2013, 08:34:20 am
When i install my game on my samsung galaxy using only 2d toolkit assets in my scene everything works as it should and all the graphics are displayed.

However when i close/quit my game and start it up again, all the graphics are not visible.

When i clear the data for my game application in the android settings and start the game again everything works great again.

When i (when testing) add a unity cube primitive it also works again regardless if i clear data or not.(i found this to be pretty weird).

Only when exported and installed on mobile does this problem occur.

None of the objects are moved/rotated/scaled, or become disabled or have their renderer disabled.

Does anyone know what might cause this?
Title: Re: Android disappearing graphics on 2nd boot.
Post by: willeml85 on July 06, 2013, 09:06:05 am
Allright some additional info and possible fix.
When exporting with the graphics level configuration : OPENGL ES 1.x instead of the previous OPENGL ES 2.0 there are no longer any issues and neither is there any data that can be cleared after running it.
When i used OPEN GL ES 2.0 there was always 100 kb that i needed to clear before the graphics returned to their correct state when booting the game.
Title: Re: Android disappearing graphics on 2nd boot.
Post by: unikronsoftware on July 06, 2013, 11:44:19 am
This looks very much like a Unity issue. I recommend making a bug report.
Title: Re: Android disappearing graphics on 2nd boot.
Post by: cloudcamaleoniv on July 07, 2013, 01:49:05 am
I got the same problem here with my Motorola Defy.

Works fine on 1st boot, but I have to clear app data to get it running on 2nd boot ahead. Very, very strange.
Title: Re: Android disappearing graphics on 2nd boot.
Post by: unikronsoftware on July 07, 2013, 10:41:16 am
Please report this to Unity. This is very likely to be a Unity bug.
Title: Re: Android disappearing graphics on 2nd boot.
Post by: DreamingP on July 07, 2013, 03:07:28 pm
I got the same problem with samsung galaxy 1.
But Nexus 7 has no problem.
I need OpenGL ES 2.0  :'(

edit:
I'm using latest version of unity3d, 4.1.5
I tested version 4.1 and 4.0.1
Version 4.1 has same problem.
Version 4.0.1 has no problem.


Title: Re: Android disappearing graphics on 2nd boot.
Post by: unikronsoftware on July 07, 2013, 04:25:15 pm
You need to report this to Unity. This is almost 100% a bug in Unity. Use the built in bug reporter "Help > Report a Bug" to report it.
Title: Re: Android disappearing graphics on 2nd boot.
Post by: cloudcamaleoniv on July 08, 2013, 06:57:47 am
I sent the report yesterday, thanks unikron!

For those who still have issues. Before export, click in "player settings" - "other settings" - disabling "dynamic batching" fix the problem here. It's a cheap solution before Unity fixes it.
Title: Re: Android disappearing graphics on 2nd boot.
Post by: unikronsoftware on July 08, 2013, 09:42:46 am
Thanks for submitting the bug report @cloudcameleoniv

Disabling dynamic batching will seriously bloat draw calls, though.
Its probably only worth considering as a solution if you have very few sprites.