I'm switching a game from xna to monogame and hit a snag.
I've got my .spritefont file in project_name/Content, it's listed in the solution explorer, and I'm loading it with this line:
debug_font = Content.Load<SpriteFont> ("Kooten");
But I'm getting the error:
"Microsoft.Xna.Framework.Content.ContentLoadException occurred in Monogame.Framework.dll. Could not load Kooten asset as a non-content file!"
What am I missing?
For adding a
SpriteFontin monogame, you need to create it in a Content project of an xna type, compile the game and then copy the generatedxnbfile over to the monogame project (the file can be located in the output directory path). Then change its properties so that it is set as "Content" and copied to the output folder if newer.You can find the full explanation on this blog.