using System.Collections; using System.Collections.Generic; using UnityEngine; using PixelCrushers; using UnityEngine; using UnityEngine.SceneManagement; namespace Beyond { public class SceneSaver : Saver // Rename this class. { public override string RecordData() { return SceneManager.GetActiveScene().name; } public override void ApplyData(string data) { // if (SceneManager.GetActiveScene().name != data) // SaveSystem.LoadScene(data); } //public override void ApplyDataImmediate() //{ // // If your Saver needs to pull data from the Save System immediately after // // loading a scene, instead of waiting for ApplyData to be called at its // // normal time, which may be some number of frames after the scene has started, // // it can implement this method. For efficiency, the Save System will not look up // // the Saver's data; your method must look it up manually by calling // // SaveSystem.savedGameData.GetData(key). //} public override void OnBeforeSceneChange() { // The Save System will call this method before scene changes. If your saver listens for // OnDisable or OnDestroy messages (see DestructibleSaver for example), it can use this // method to ignore the next OnDisable or OnDestroy message since they will be called // because the entire scene is being unloaded. } //public override void OnRestartGame() //{ // // The Save System will call this method when restarting the game from the beginning. // // Your Saver can reset things to a fresh state if necessary. //} } }