public override void OnLevelUnloading() { try { XML_VersionOne xml = new XML_VersionOne(); xml.writeXML(currentFileLocation); } catch (Exception e) { Debugging.panelWarning(e.Message); } }