Quantcast
Channel: Active questions tagged xna-4.0 - Game Development Stack Exchange
Viewing all articles
Browse latest Browse all 33

Disposing only certain resources in XNA?

$
0
0

The ContentManager in XNA 4.0 only has one Unload() method that Unloads all Assets.

I want to have some "global" Assets that are always loaded, but then I want per-Level Assets which should be Unloaded when the level is changed.

Should I create a second Instance of the ContentManager as part of the Level.cs Class? Or should I use Game.Content and then call .Dispose on the Assets I load? Or should I create my own ContentManager on top of the ReadAsset function as outlined here?


Viewing all articles
Browse latest Browse all 33

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>