You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Unload with IUrlReference gets called this way, then the exception is thrown: System.InvalidOperationException: 'Content not loaded through this ContentManager.'
Also, the UrlReferenceContentManagerExtenstions is incorrectly spelled (the extra t in extension).
Potential Solutions
Add void Unload(IUrlReference urlReference) on IContentManager
I don't think checking within void Unload(object obj) would be a good idea because there might potentially be a case where an UrlReference is somehow intentionally loaded/unloaded through ContentManager?
UrlReferenceContentManagerExtenstions would just be a breaking name change fix.
Workaround
Call ContentManagerExtenstions.Unload(contentManager, urlReference) or contentManager.Unload(urlReference.Url)
The text was updated successfully, but these errors were encountered:
Release Type: Official Release
Version: 4.2.0.2232 and all prior versions when
IUrlReference
was added.Platform(s): All
Describe the bug
Calling the following Unload extension method with an
IUrlReference
on this line won't work if called like:stride/sources/core/Stride.Core.Serialization/Serialization/UrlReferenceContentManagerExtenstions.cs
Line 114 in 256c47b
This is because the
IContentManager.Unload(object obj)
is on the 'real' interface and will always take priority.stride/sources/core/Stride.Core.Serialization/Serialization/Contents/IContentManager.cs
Line 69 in 256c47b
When Unload with IUrlReference gets called this way, then the exception is thrown:
System.InvalidOperationException: 'Content not loaded through this ContentManager.'
Also, the
UrlReferenceContentManagerExtenstions
is incorrectly spelled (the extrat
in extension).Potential Solutions
Add
void Unload(IUrlReference urlReference)
onIContentManager
I don't think checking within
void Unload(object obj)
would be a good idea because there might potentially be a case where an UrlReference is somehow intentionally loaded/unloaded through ContentManager?UrlReferenceContentManagerExtenstions
would just be a breaking name change fix.Workaround
Call
ContentManagerExtenstions.Unload(contentManager, urlReference)
orcontentManager.Unload(urlReference.Url)
The text was updated successfully, but these errors were encountered: