Hi,
In my game I have about 10 NPC prefabs, each prefab would load in 50-200 ms on Android in Unity 5.6.1.
After I upgraded to 2017.1, each load takes 3-4 seconds, and all NPC objects are loaded in 45 seconds. (!!!)
I tried Resources.LoadAsync and referencing prefabs in ScriptableObject, but none of them helped.
If I removed all references of animations from prefab (Avatar, Clips), loading time went down to 9 seconds.
Each NPC has 3 MonoBehaviours, Animator, BoxCollider, RigidBody, SkinnedMeshRenderer and few bones.
It seems you found a regression in 2017.1, thus I recommend to submit a bug-report following the advice in this document, to help that this issue does not occur in future Unity releases.
Using the bug-reporter seems to be an important step, because it makes sure the report is in Unity Technologies bug-tracking pipeline and has to be processed at some point. Using the forum is often used to add to a little more attention to a bug-report, but does not replace actually submitting a bug-report.
It’s from advantage to attach a project to the bug-report that UT can use to reproduce the issue and test their fix against. The easier an issue can be reproduced by QA, the more likely it is to get forwarded to a developer, who might or might not work on a bug-fix for that at some point.
After you submitted the bug-report, you receive a confirmation email with a Case number. UT often asks us to post the Case number in the forum thread, which allows them to find that bug-report if they look at your post.
Following these steps will increase the chance that UT is looking at your issue tremendously.
Hey!
We’re still having this problem on Unity 2017.2 (we’ve been checking the latest patches too). @elhispano are you using il2cpp or mono? (we’re on mono)
Any one else?
Submitted a repro project (case 969845) on Unity 2017.2.0p2
@LampRabbit Please file a bug report then… looks like we have the same symptoms but different issues. We noticed a huuuge performance hit on Resoruces.LoadAsync - when loading character models (without animations even - as those are shared) and absymal load times for app. We still see it in 2017.2.0p2 but not in 2017.1.2p3 (though app load times are still quite slow).
I case this helps anyone: we detected that the loading times were absymal for one particular FBX. Instead of loading it via Resources we decided to keep a direct reference to it (so it’s now loaded with the scene). This fixed the issue.
We’ve found that building programmatically via BuildPipeline in 2017.1 avoids this issue for anyone who can’t move to 2017.2 (which also fixes it for us). No special options are needed and it supports Gradle as well as internal.
Sorry can’t remember exactly now I think a saw something in the profiler that made me check our fbx files.
We had all animations in one file and it was quite big because of that - so it was the first suspect.
pro tip: use deep profile or profiler.begin / endSample to get more insight into what’s going on.