I have a problem with my game. I am using multiple classes for different screens, for exemple: Main Menu is one screen, When playing is another, and so on...
I decided to use multiple ContentManagers, different content for each screen, so the game won't consume very much RAM, and to load the screen's content when the user will navigate on that screen, and unload/dispose the content when user navigates away.
I have created different content managers for each screen that I had to, but for exemple if I navigate from main menu, to the playing screen, then back to the main menu (when the content from playing screen gets disposed), and then back to the playing screen, I get this error:
An exception of type 'System.ObjectDisposedException' occurred in MonoGame.Framework.DLL but was not handled in user code
Additional information: Cannot access a disposed object.
I googled this problem, and the only answer that I found was not to dispose the Content Manager, but each texture on that screen.
Is this the only way that I can handle this? To dispose each texture from the screen, when user navigates away?
Thanks.