Not all references are being released
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start with Basic/ComponentReference/Assets/Scripts/ComponentReference.cs around line 31 and trace the GameObjectReady callback alongside the reported AssetReferenceComponent behavior. Verify whether releasing the supplied handle is correct and whether released references stop sticking around; done means the sample's loading and release behavior is confirmed or the needed correction is documented.
Written by the indexing model from the issue text.
Description
AsyncOperationHandle<TComponent> GameObjectReady(AsyncOperationHandle<GameObject> arg)
{
var comp = arg.Result.GetComponent<TComponent>();
return Addressables.ResourceManager.CreateCompletedOperation<TComponent>(comp, string.Empty);
}
Using the AssetReferenceComponent i see some references to things i have released still sticking around.
Adding this extra release here seems to allow things to load and the other references i was seeing are going away now.
AsyncOperationHandle<TComponent> GameObjectReady(AsyncOperationHandle<GameObject> arg)
{
var comp = arg.Result.GetComponent<TComponent>();
Addressables.Release(arg);
return Addressables.ResourceManager.CreateCompletedOperation<TComponent>(comp, string.Empty);
}
Is this a correct fix?
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 303
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Unity-Technologies/Addressables-Sample
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Unity-Technologies/Addressables-Sample#98 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Unity-Technologies/Addressables-Sample#94 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
Unity-Technologies/Addressables-Sample#90 · 1 comment ·
All issues in Unity-Technologies/Addressables-Sample
Similar issues
-
bug documentation frontend
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
azurenoops/spin_agent#975 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100