Hi, I created a empty gameobject that stores all 4 sphere in it.
How do I place all 4 sphere position into a XML file?
Currently I am able to read the 4 sphere position
foreach (Transform child in Root.transform)
Debug.Log(child.transform.position);
Than I create a new XML file
// Create subfolder
System.IO.Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"/Assets");
// Declaration
XmlDeclaration dec = xmlDoc.CreateXmlDeclaration("1.0", null, null);
xmlDoc.AppendChild(dec);
// Create the root element
XmlElement root = xmlDoc.CreateElement("Vechicles");
xmlDoc.AppendChild(root);
xmlDoc.Save(filepath);
Debug.Log("File Created");
How do I store the 4 sphere position into the newly created XML file?