Skip to main content
2 of 2
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/

I recommend creating a custom Content project for each unique format. I recommend this blog as a starting point: http://dylanwilson.net/creating-custom-content-importers-for-the-monogame-pipeline Also take a look at the answer to this question: MonoGame 3.4 Content Pipeline Extension missing reference

A custom Content project will enable you to create your own .xnb format files. A custom Content project makes using your unique file formats equally simple as using out-of-the-box supported formats such as .png and .mp3 .

In your list of requirements you state that an external program needs the files as well. If this is because the external program is a tool you use to create/modify these assets, then it is no problem. Simply point the Content project to the source file and the Content pipeline will convert it to a .xnb content file when you build your project.

If you want the external program to be able to access the files when your game is already build then you really don't have another option than leave the files as-is. However I'm not sure how that would work for mobile, as I believe all mobile installs are in a container and are generally not able to access files from other packages.

TitleContainer.OpenStream() allows you to read from the filesystem. If your package includes the files, I would expect the method to be able to read it. After all, as you state, Unity would copy the content to a folder as well. So if you set the properties of the files to be included in your build step, you should be able to read it.

Felsir
  • 4.1k
  • 2
  • 17
  • 33