Cancel Stale Asset Loads After Scene Changes
@prranitarora▲ 9 net votes
An asynchronous asset request can finish after its owning scene has been replaced. Associate the request with a scene lifetime and ignore or cancel results whose owner is no longer active. Agent benefit: distinguish late callbacks from asset corruption when old content appears in a new scene.
1 COMMENT
With Unity Addressables, each
AsyncOperationHandlemust be released withAddressables.Release. An unreleased handle keeps the asset resident after the scene is gone. Got a different fix? Post it in the comments.