1

I want to build a Tilemap in the Content Pipeline with MonoGame.Extendend but i get a exception.

Exception displayed in Content.mgcb

MonoGame.Extended : 3.8.0

The Tileset has been embedded (Marked checkbox before create) and the reference for Content.mgcb is set.

I use Visual Studio 22 and added MonoGame.Extended via NuGet

I tried to copy the project multiple times but it doesnt work.

Thanks for your help Community !

Techobert
  • 11
  • 1

1 Answers1

1

Right click on Content.mgcb in the project. Choose Open With...->Source Code (Text) Editor. Add a reference to the MG Extended Content Pipeline Dll. Mine looks similar to the code snippet below. I build MG Extended from code, though (not the Nuget), so your reference to the pipeline will look different than mine.

Also make sure that the Pipeline.dll is referenced in your project.

/reference:..\..\MonoGame.Extended.Content.Pipeline\bin\netcoreapp3.1\MonoGame.Extended.Content.Pipeline.dll

The tileset doesn't have to be embedded, just in the same folder as the tmx files. In my project it works with Build Action = None and Copy to Output Directory as Do not copy. The MGE pipeline should find these files and build them in.

Final thing, make sure the tileset is correctly referenced in the .tmx file. Right click and open the tmx with a word editor. There should be a setter for any tilesets you use. For example in the image below, both of the tilesets used are in the same folder as the tmx.

enter image description here

tval
  • 412
  • 3
  • 17
  • 1
    Hey thanks for your answer. The pipeline is referenced even after the failed Build. I think the exception is caused by a null parameter for the TiledMapImporter. But i dont know why. – Techobert Nov 05 '22 at 10:08