public static void RegisterSaver(Saver saver) { if (saver == null || m_savers.Contains(saver)) { return; } m_savers.Add(saver); }
private static void AssignNewKey(Saver saver, string reason) { if (saver == null) { return; } var key = CleanName(saver.name) + "_" + Mathf.Abs(saver.GetInstanceID()); Debug.Log(saver.name + "." + saver.GetType().Name + ".Key = " + key + reason, saver); Undo.RecordObject(saver, "Key"); saver._internalKeyValue = key; saver.appendSaverTypeToKey = false; }
public static void UpdateSaveData(Saver saver, string data) { m_savedGameData.SetData(saver.key, GetSaverSceneIndex(saver), data); }
private static int GetSaverSceneIndex(Saver saver) { return((saver == null || !saver.saveAcrossSceneChanges) ? currentSceneIndex : NoSceneIndex); }
public static void UnregisterSaver(Saver saver) { m_savers.Remove(saver); }