I’ve just managed to get a new laptop setup with Monogame and it’s loading previous projects without errors, WooTheHoo!!
However, when I run an existing project I get errors from the LoadContent routine, “content file was not found, blah blah.”
I have copied the exact directory structure from the desktop to the new laptop, all files and folders are identical. The old folder structure is Game/bin/Windows/Debug/Content. But, that’s obviously not what the code on the laptop is looking for.
In MonoGame 3.6 support for loading raw assets was removed from ContentManager. It only loads .xnb’s from 3.6 on. To load raw assets you need to use the functions in the classes the assets get loaded into. (E.g. Texture2D.FromStream)
So, FromStream or put everything in the PipeLine tool?
I’ve read somewhere if you’re using Streams you have to properly dispose of the objects, does this mean if the game crashed under testing memory is robbed from the GPU? Or that it’s just goof practice?
Content isn’t unloaded from the ContentManager automatically when a crash occurs, so in that respect there’s no difference between FromStream and ContentManager.Load. A ContentManager does handle disposing unmanaged resources for assets it loaded when Unload is called, so you don’t have to call Dispose explicitly.
There’s other good reasons to use the Pipeline Tool + ContentManager though. You can read about them in a blog post by Dean here.
Yeah, I’ve tried using it before but it was buggy and complicated. As I’ve said in another post it behaves strangely and it was so convoluted. I had to import files, then build, then find all the files and copy them to other directories. It needs work to make is more usable. I wish they’d give me the code, I’d make it a lot more user friendly.
Please read my response in the other topic ( Pipeline Confusion - #5 by Jjagg). I strongly disagree on the convolutedness and buggyness of the Pipeline Tool/ContentManager. At least right now, I don’t know when you last used it of course.