Search Unity

Updating XML/PHP(?) from webplayer

Discussion in 'Multiplayer' started by KnifeFightBob, Mar 1, 2010.

  1. KnifeFightBob

    KnifeFightBob

    Joined:
    Jan 22, 2009
    Posts:
    196
    Hi. Finally getting some stuff to work, but wanted to get some feedback on how I should go about this.

    What I want to do is let users, via the webplayer version of the app we are building, change and update values of text meshes around the "level". These should be read at startup and when anyone updates the text values. The XML for text meshes is working, and I am getting good results locally. I figure I might need a database for handling some of this as I understand that writing to XML is not possible from a webplayer, so I got that working locally as well. How would I go about coding from here?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    put it on a website and let the user communicate to the php that handles that writing / reading
     
  3. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    As dreamora indicated you'll have to have some sort of server-side script do the writing for you as that's not something a local client like the Unity Web Player can do alone. So you can call a PHP file to get the XML on load, then another to modify/write a new XML file as needed at run-time. Or call a CGI script, or any number of other server-side options to write and/or modify the XML as needed, on the server. All of this will be done through the WWW class in Unity and just append modification data as needed.

    Let us know if you have any questions!