Saving XML On Streaming assets in ILC2PP build

I have been creating a level editor for my game
each level is less than 100kb anfd im savimg that data in XML For now

Everything saves correctly on Mono
but when i switch to ilc2pp it gices me this error

i have been researching a lot with no results and i dont know if im missing something…

Also it just happens on build

In editor works properly
un mono build works properly
but in ILC2PP build doesnt save
but it partially load the data, my enemies doesnt load for example

there is an example of a level xml file

Streaming Assets is for you to put assets into Unity that Unity agrees not to touch in any way, and then you can READ them at runtime.

If you want to save things at runtime, you need another filepath, such as:

Also, why it works in Mono is probably more of an accident than anything else.

1 Like

Is there any way to set a custom data path so users can get easyly to their maps and share them wile im working on it?

My intention is to get a database so people from Steam and Oculus store can share those levels inside the game itself
meanwhile it was actually easy to explain a user how to downlod and install new levels

Also i would need to keep some levels with the build

also thanks a lot it worked properly except there are some data doesnt load, i.e Enemies i will try to research why some dta loads and some other not
also doesnt give errors

I stand by this post I made earlier today regarding XML:

https://discussions.unity.com/t/790605/2

In summary,

Once you go JSON the world will be a far friendlier place. As a wise man once said,

“Let’s say you have a problem and you decide to use XML. Now you have two problems.”

As I say, “Friends don’t let friends use XML.”

Also, “XML… not even once.”

If you use binary, when you have a problem, you cannot easily look at the data. You can’t trivially print it out and change it with a text editor.

Do yourself and all your teammates a favor. Use JSON.

deleted message

You were right, the problem was the xml, because i tried json and binay and both loaded the enemies correctly
Thanks a lot for your time!

1 Like