Activating a GameObject caused hiccups of ~100ms

More
7 years 6 months ago #1813 by buxy
Hi I2 team!

I am using version 2.6.6 b1. Enabling a (UGUI) window's GameObject caused a sudden brief slowdown. I have pinpointed the problem:

ResourceManager.cs:131 invoked a Resources.UnloadUnusedAssets(); call.

As we are working on a quite big game, the implicit call of GC.MarkDependencies(); takes an enormous time. We are managing resources ourselves, so it was an unpleasant surprise. Please consider not making this call, or doing it in a more delicate way.

Thanks,
BuXY

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #1816 by Frank
Hi,
Thanks for pointing this out!
I was going to remove that call anyways, as in Unity 5 it shouldn't be needed after every resource unload, but it was there for safety.
In your case, its safe to remove it, in the next release I will schedule it to only happen once and not in the frame you switch languages (as that frame is quite expensive as is)

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #2096 by ModernAlchemist
We just tracked down a nasty bug on iOS IL2CPP which caused our game to randomly crash because of this call "Resources.UnloadUnusedAssets();".
Unity left is with no stack trace whatsoever and the error message looked similar to this: forum.unity3d.com/threads/il2cpp-crashes...nd-loadlevel.316775/ and forum.unity3d.com/threads/unity-5-crash-...assetbundles.380944/

Please Log in or Create an account to join the conversation.

Time to create page: 0.290 seconds
Template by JoomlaShine