Setup
Last updated
Last updated
This page assumes you have an existing MonoGame project. This can be an empty project or an existing game.
MonoGame Gum works on a variety of platforms including DesktopGL, DirectX, and mobile. It's fully functional with all flavors of XNA-like libraries including MonoGame, Kni (including on web), and FNA. It can be used alongside other libraries such as MonoGameExtended and Nez. If your particular platform is not supported please contact us on Discord and we will do our best to add support.
Open your MonoGame project in your preferred IDE.
Add the Gum.MonoGame
NuGet package\
To initialize Gum, modify your Game project (such as Game1.cs) so that it includes the following calls:
To test that you have successfully added Gum to the project, modify your Initialize method to add a rectangle:
If everything is initialized correctly, you should see a white rectangle at the top-left of the screen.
This page shows the minimum code needed to get Gum up and running in your project. If you want to load a Gum project created in the Gum tool, see the Loading a Gum Project page.
The Gum tool can be used to create Gum projects which can be loaded into your MonoGame project. To download and run the Gum tool, see the Setup page.