niezhijing

Hi! I have a similar problem, where I load the new scene, where the Atlas is not referenced in any way, but according to the Profiler, it still has a lot of references to it.

This is the code for when I am changing scenes:

await UnloadScene(sceneToUnload);
AtlasUtilities.ClearCache();
await UniTask.Yield();
await Resources.UnloadUnusedAssets();
await BuildScene(sceneToLoad);

When I uninstalled the old scene and performed GC and switched to the new scene, there were still Spine resources of the old scene that were not recovered
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
niezhijing
  • Messaggi: 14

Harald

Please note that the references you tracked are a profiler capture from the Unity Editor play mode (as the remark says "Memory usage is the Editor is not the same is it would be in a Player"). We could not yet reproduce such an issue in the built executable. Do you also encounter this behaviour when profiling your built executable?
Avatar utente
Harald

Harri
  • Messaggi: 4196

niezhijing

Harald ha scritto:Please note that the references you tracked are a profiler capture from the Unity Editor play mode (as the remark says "Memory usage is the Editor is not the same is it would be in a Player"). We could not yet reproduce such an issue in the built executable. Do you also encounter this behaviour when profiling your built executable?
I got the same results on my real Android mobile phone
niezhijing
  • Messaggi: 14

Harald

Thanks for getting back to us, sorry to hear that it also occurs on your target device. Could you please send us a minimal Unity project that shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at what's going wrong.
Avatar utente
Harald

Harri
  • Messaggi: 4196

niezhijing

Sorry,There's something wrong with the way I unloaded
niezhijing
  • Messaggi: 14

Harald

Thanks for getting back to us. I have seen your new thread here:
Is there a way to release the initial resource.
Let's continue the discussion over there.
Avatar utente
Harald

Harri
  • Messaggi: 4196


Torna a Unity