Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved Saving XML On Streaming assets in ILC2PP build

Discussion in 'Scripting' started by Extrys, May 13, 2020.

  1. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    293
    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
    upload_2020-5-13_21-11-5.png

    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
     
    Last edited: May 13, 2020
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    25,715
    Extrys likes this.
  3. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    293
    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
     
    Last edited: May 13, 2020
  4. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    293
    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
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    25,715
    I stand by this post I made earlier today regarding XML:

    https://forum.unity.com/threads/xmlelement-getattribute-returns-null.889399/#post-5843311

    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."
     
  6. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    293
    [QUOTE = "Kurt-Dekker, publicación: 5844310, miembro: 225647"] Respaldo esta publicación que hice más temprano hoy con respecto a XML:

    https://forum.unity.com/threads/xmlelement-getattribute-returns-null.889399/#post-5843311

    En resumen,

    Una vez que vayas a JSON, el mundo será un lugar mucho más amigable. Como un hombre sabio dijo una vez:

    "Digamos que tienes un problema y decides usar XML. Ahora tienes dos problemas".

    Como digo, "los amigos no dejan que los amigos usen XML".

    Además, "XML ... ni siquiera una vez". [/ QUOTE]

    yowill probably go for Binary since its performance and size, but im using xml for the moment as a way to debuging the data saved

    i will take a look anyways to your post
     
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    25,715
    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.
     
  8. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    293
    deleted message
     
    Last edited: May 14, 2020
  9. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    293
    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!
     
    Last edited: May 14, 2020
    Kurt-Dekker likes this.
unityunity