The only script in the entire game is in Scene 2 (a single menu button script). Every single texture in scene 2 is Mobile/Diffuse @ 128.
Scene 1 has mobile normal maps @ 512.
This doesn’t make any sense at all. I’ve been going over it for about 3 days now, and everything comes back to the textures. A box with a basic 128 texture takes 30+ seconds to load.
I’m using my Droid Bionic, so I doubt it’s the hardware. Besides, if it was having trouble with a cube, it wouldn’t load the 1st scene in a few seconds.
Are there any known issues that are causing problems? At this point, the android function of unity is pretty much useless.
What version of Unity? Also, what version are you building to? What version on your phone.
To start I would send the apk to some friends or people you know to see if there is the same issue. I’ve never had loading issues but there may indeed be a bug, first thing though is to rule out the device.
I’m trying to get my friend to test it, but it seems like if the device was having problems, then both scenes would have problems, not just one.
I’m building for 2.0.1 and I’m running it on my Droid Bionic with Android 4.1.2.
Unity is 4.1.2f1. I’ll post as soon as I get someone else to load up the app.
EDIT - Confirmed that another device is having the same problems. It’s a Galaxy S3, and it’s taking almost 30 seconds to load a plane with a 32x32 mobile texture and basic skybox.
Never had a problem like that, rather big scenes load in about a bit over 5 seconds or so. (And this is on slower device than S3 that you mentioned…)
Are you using proper texture compressions (ETC for universal builds) so that Unity doesn’t have to decompress them to RGB(A) on load.
Tested with an ETC texture, no difference. Even cut it down to 64x64, and it still takes way too long to load.
Cut it down to 32 point and still no change.
Removed all textures from the cube and no change.
Removed the skybox (it was a 128, ETC texture) and no change.
Trying one other thing, but at this point, I have a 3d text with a dozen lines of code and an untextured cube taking 30ish seconds to load.
EDIT: Tried reducing the size and font size of the 3d text, but it didn’t improve the load time at all. I’m at a complete loss. There is virtually nothing being loaded in the scene, 2 draw calls and 30+ second load times.
I wouldn’t be able to launch the scene. But I did remove the 3d text, so it’s not loading the script. Besides, the script is running in the 1st scene without any problems.
The scene still takes 30 seconds to load with just an untextured 50 x 10 cube in the middle of it.
EDIT: For reference, this is the script. I can’t imagine it would cause this massive of a performance hit:
the two main culprits of loading are (there are three, but third one is more internal to unity ;-)):
textures and shaders compilation
so, if you are to be believed you did properly with textures - check your shaders. Like: force everything to use one simple shader etc. Also - if you are on pro - check profiler. Or simply check logcat - i dont remember about general-user player, but when i build it myself i can see immediately that shader XXX took that much time to be compiled.
Yes it really loads for almost 30 seconds… At least it spams some mecanim errors to logcat in the first scene, and when loading the second scene ram usage goes to over 100 MB from 40 MB, so it seems to load something unnecessary…
Alright, exported the 2 scenes with dependencies and submitted them via bug support feature. Hopefully this is an easy fix. It’s a pretty big wrench in the gears
Oh, sorry, I thought it would be internal from there. Case 539833.
It’s worth noting that I tried to import the same package I sent you into a new project, and now it won’t even build. It gets to the problem scene and hangs indefinitely.
That wasn’t a bug, it was a heads up that you might have problems with the package. Looks like you didn’t though.
I read the post.
Yeah, I turned off all the objects that had substances and the problem remained. It looks like someone else in the thread experienced the same problem though. I deleted the old project and problematic scene, and the problems went away. It loads very fast and everything works fine and it still uses substances.
That’s about all I know. It’s possible that something was broken with the substances in scene 2, but I honestly couldn’t tell you.