public void Upgrade() { directoryPath = XMLSaver.GetDirectoryPath(); Saver tmp; tmp = new Saver(); tmp.path = path; tmp.Load(); if (tmp.version == this.version) { return; } #if !RELEASE_VERSION Debug.LogFormat("<color=red>{0}: {1}</color>", "Upgrading", GetType().ToString()); #endif OnUpgrade(); Save(); Load(); }