c# - An Example about XNA UnloadContent -


When I use XNA to create a game, I see zero unload content, but how do I use it Can someone give me an example of unload content and can show it in the last game? Thanks a lot.

If you are loading in any resources that need to be settled, you will do so For example, in the unload content , you have a file that you want to keep it open after you load it.

  Private filestream _myFileStream; Private zero load content () {_myFileStream = File.Open ("myLevelDataThatIKeepOpen.lvl", FileMode.Append); } Private zero unload content () {if (_myFileStream! = Null) {_myFileStream.Close (); _myFileStream.Dispose (); }}  

Specifically, it is for content that you manage outside the Content Manager.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -