-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle not release when AssetManager.Unload #2
Comments
Good find. I'll fix this and post an update |
hello, tried looking into this , but in code i see handle is being released with Unload Method ? may be its in the pool so ? try untick use pool and see ? in mine i see it releases everything whether i use pool or not. try doing 👍 only issue so far for me is if i don't do preload event viewer don't show anything! even if i use preload with blank field it works! as in Example UI it utilizes LoadAssetsByLabelAsync ... i am trying to figure out where it it getting asset from when not using preload ... its difficult to follow thru codes especially when its not yours and your style ... i had to break the code in many smaller files .. so i took the manager and moved it to different classes for load ,unload,instantiate,destroy,utilities .. just makes it easier to follow the code ... So may be i added Addressables.Release(handle); at the end of unload method ? i don't remember just check. |
preload & pool and lunch app then you would see all asset loaded ... then do UnloadAllAsset without instantiating any particle or audio ? does it releases everything ?
|
I define a List to collect instantiate handle, and add handle to List when handle has been created, then release all handle at UnloadAllAssets(). It work fine with GameObject, but not with ParticleSystem, I think there has some other problem with instantiate component.
|
There has some problem with addressable event viewer, please try to use Addressable ver 1.8.4 or ver 1.9.2 ( My unity version is 2019.4.1). If it still not work, try to click "Record" and "Clear" button when editor play, maybe click twice button, it would be work. With the ver 1.10.0 to ver 1.12.0, you can try to edit the function RegisterEventHandler of EventViewerWindow class which the file is in "Packages\com.unity.addressables@1.12.0\Editor\Diagnostics\GUI\EventViewerWindow.cs"
to
Sometimes the bug would be fixed, sometimes not. |
For example:
public static bool TryGetOrLoadComponentAsync<TComponentType>(AssetReference aRef, out AsyncOperationHandle<TComponentType> handle) where TComponentType : Component
the handle should be release, or the asset won't be unload.
The text was updated successfully, but these errors were encountered: