Open kimimaru4000 opened 6 years ago
I'm going to look more into this. @Jjagg I vaguely recall a while back you said that models may be problematic because this method would have to also unload anything related to them, such as textures. What if we make it clear that it's unloading only a single asset and not anything else?
I'm fine with adding the method. It's something that comes up every once in a while.
This has been a discussion point before though, so I'd like other people to weigh in.
@tomspilman @cra0zy
Definitely something that would prove useful. I keep hearing from devs who re-implement their own content manager because of this.
Agreed.
MonoGame currently does not support unloading content individually, which is a feature I feel can be useful for a variety of reasons. I'll list several use-cases:
These can be done with multiple ContentManagers, but that seems overkill if you have only a few assets that you'd need for a specific purpose.
I suggest we can either add an overload to Unload with the following signature:
public virtual void Unload(string assetName)
or add a new method:
public virtual void UnloadAsset(string assetName)
Thoughts?