Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Non-generic Asset Unload #324

Closed
Inverness opened this issue Mar 29, 2014 · 1 comment
Closed

Non-generic Asset Unload #324

Inverness opened this issue Mar 29, 2014 · 1 comment

Comments

@Inverness
Copy link
Contributor

I notice that the ContentManager contains a non-generic Load() method that types a Type object. I would like it if the equivalent virtual unload method could be added:

bool Unload(Type assetType, string assetName);

Some time ago I added an Unload(assetName) method to the ContentManager that did not require a type. Since then, I noticed the AssetKey type has been added which requires the use of a type. My content manager subclass has that type, but I'm currently having to create a generic delegate from a Type object to work around this issue.

To elaborate on why I need this: my content manager subclass manages references to assets both for asynchronous loading and to unload assets that are no longer being used. This is necessary since it's an online multiplayer game where multiple levels in a world can be streamed in or out of memory as necessary.

ArtiomCiumac added a commit that referenced this issue Mar 29, 2014
@ArtiomCiumac
Copy link
Contributor

Good point, I have added the requested method overload to match overloads for Load.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants