public static void LOAD_SAVED(string STR){
XmlDocument XXX = new XmlDocument();
XXX.Load(STR);
XmlElement elem = (XmlElement)XXX.DocumentElement.FirstChild;
XmlNode node = XXX.DocumentElement;
IEnumerator ienum = node.GetEnumerator();
XmlNode PART;
string TREMOR="";
string CP="";
GameObject[] POINTS;
POINTS = GlobalTransfer.GetAllChildren(GameObject.FindGameObjectWithTag("Player"));
// int n =0;
while((ienum.MoveNext())){
PART = (XmlNode)ienum.Current;
int TITS=-1;
try{
TITS = int.Parse(PART.InnerXml);
TREMOR = PART.OuterXml;
TREMOR = TREMOR.Substring(0,TREMOR.IndexOf(">"));
TREMOR = TREMOR.Replace("<","");
TREMOR = TREMOR.Replace("_","/");
CP = TREMOR.Split(new char[] {'/','/'})[1];
TREMOR = TREMOR.Substring(TREMOR.IndexOf('/',1));
}catch{}
//Debug.Log(CP);
// Debug.Log(TREMOR);
Transform LoUP = (Transform)Instantiate(GETGO(TITS).transform,Vector3.zero,Quaternion.identity);
foreach(GameObject PP in POINTS){
if(TREMOR == "/"+CP){
TREMOR ="";
}
Debug.Log(TREMOR);
if(PP.GetComponent<UNICID>().UID == CP && TREMOR==""){
LoUP.parent = PP.transform;
LoUP.parent.GetComponent<MeshRenderer>().enabled = false;
LoUP.localPosition = new Vector3(0,0,0);
}
if(PP.GetComponent<UNICID>().UID == CP && TREMOR.Length>1){
Debug.Log(TREMOR.Substring(1));
string[] Eval = TREMOR.Split('/');
LoUP.parent = PP.transform.GetChild(0).FindChild(TREMOR.Substring(1));
if(TREMOR.Length>7){
for(int i=0;i<Eval.Length;i++){
Debug.Log("BEFORE"+LoUP.parent.name);
LoUP.parent = LoUP.parent.GetChild(0).FindChild(Eval[i]).FindChild(Eval[i+1]);
Debug.Log("AFTER"+LoUP.parent.name);
}
}
LoUP.parent.GetComponent<MeshRenderer>().enabled = false;
LoUP.localPosition = new Vector3(0,0,0);
}
}
}
}
}