O'Reilly logo

Unity 4 Game Development HOTSHOT by Jate Wittayabundit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an XMLParser script

In this section, we will create the XMLParser script that will parse the XML data from the server to use for the Saving and loading server high score section. We will use XmlDocument from the .NET framework in C#.

Engage thrusters

Now, we can start creating the XMLParser script using the following steps:

  1. We will navigate to Chapter8 | Scripts | C# | Hiscore (for C# users) or Chapter8 | Scripts | Javascript | Hiscore (for Unity JavaScript users), and right-click and go to Create | C# Script (for C# users) or Create | Javascript. We will name it XMLParser and double-click on it to open the XMLParser file.
  2. First, we will start coding at the beginning of the XMLParser script, as shown in the following code:
    // Unity JavaScript ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required