umm when did I say you can’t?
I simply said you can’t without trouble
the main reason why I’m posting this is because most tutorials either don’t use the pipeline or use an older version of it
also sometimes they don’t show where they are importing assets to which makes it really hard to follow
I answered to the fact you can load xml independantly. No need to use a pipeline for that.
And it is really easy…
Video options can be in an xml loaded at runtime. So why not other xml files separating xml from the piepline yes but it will work instead of waiting for the addressing of the issue.
I dont understand why people bump in problems and cannot see other ways of doing things.
I am still messing around with it.
but ya it would be nice to be able to compile xml file to binary by putting them in the content pipeline
this could prevent people from editing them
You can also make your own app and compile xml files into your own binaries with an encrypting method (you need skills in cryptography). As it was done in the old times
I’ve solved @Shadowblitz16’s XML issues in this thread. There were no fixes to MonoGame required. It was all solved on the game project side with the correct setup of XML assets and class libraries.
There are other issues that some people have had with XML assets that we’ve been told worked fine in XNA. Those are more important issue to solve.
see I don’t understand why I need to use a class library for one class.
that’s why I was wondering if I could load my assets though something besides the content pipeline.
so can just directly reference them in a hierarchy of folders within my single project.
The same class needs to be available to both the content pipeline and the game. That’s why it is in a class library so both can reference the type to get the reflection metadata. It doesn’t have to be in there on its own. You can have a bunch of other code in there as well if you have many items that need XML serialisation.
I dunno about necessary, but it sure makes things a lot easier.
For some things you must bypass it.
Ever try writing a simple paint program in xna how about monogame yikes.
I have like 3 classes that write data directly in binary i still use from time to time.
One of them i don’t think ill ever pitch it turns like 9 gigs of small values into a runtime useable 1 gig data stream without zipping, i wrote it before the c# binaryarray class came out. I used it for hex maps that were insanely huge to keep them from filling up all the ram with a 5k by 5k hex map. That was necessary and took some serious bit math but id rather not do it to load a model.
I think what you’ll want to look into is TitleContainer.OpenStream. This should allow you to open files directly in a cross platformish way. I can’t remember off the top of my head but I think this will open files in the Content folder of your project. They can be any type of file, and once you’ve got a stream open you can use standard C# code to de-serialize the XML or whatever.
It will open files in the root of your install. Content is usually a subdirectory from there. I say usually because not all platforms work the same way, such as Android where TitleContainer opens a stream into the AssetLibrary.
[quote=“Shadowblitz16, post:20, topic:7618, full:true”]
So then I can just store all my classes inside my class library?
[/quote]You can put any classes you like in there. As long as the classes used for XML serialization are in there, it will work.