XML

Am wondering if there is a way to make unity get data from XML meta data

There is but you gonna have to write the meta data interpreter yourself. You can load XML using the WWW class.

Google and this will get you started:

using System.IO;
using System.Xml;

public class XMLLoader : MonoBehaviour 
{
	void Start()
	{
		string xmlFilePath = "somthing/something/file.xml";
		if( File.Exists( xmlFilePath ) ){
			StreamReader xmlStream = new StreamReader( xmlFilePath ); 
			string xmlText = xmlStream.ReadToEnd(); 
			XmlDocument xmlDocument = new XmlDocument(); 
			xmlDocument.LoadXml( xmlText ); 

			if( xmlDocument != null ){				
				// get element by tag //				
				XmlNode node = xmlDocument.GetElementsByTagName( "tagName" ).Item( 0 );
				// handle node ... //
			
			}
		}
	}
}

thank you its really helpfull now I can read from XML but I’ll try to pars the nodes and am searching to find a way to get and use attributes and ather stuff
really thank you so much :slight_smile:

Check out XMLSerializer too if you use C#, it’s easier to use generally if you control the creation of the XML file.

System.Xml.Serialization.

-Jeremy

sorry is there any simple way to open any sequential file such as .txt files then modifie it close it and save?

You can use the WWW.data to open a text based file and then modify the string. Not so sure about saving.

~ce