Fome further save load work
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Interactions;
|
||||
using Bootstrap;
|
||||
using Core.SaveLoad;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
@@ -59,6 +60,7 @@ namespace Core
|
||||
{
|
||||
// Subscribe to scene load completed so we can clear registrations when scenes change
|
||||
SceneManagerService.Instance.SceneLoadStarted += OnSceneLoadStarted;
|
||||
|
||||
Logging.Debug("[ItemManager] Subscribed to SceneManagerService events");
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using AppleHills.Core.Settings;
|
||||
using Bootstrap;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -55,12 +56,18 @@ namespace Core.SaveLoad
|
||||
#if UNITY_EDITOR
|
||||
OnSceneLoadCompleted("RestoreInEditor");
|
||||
#endif
|
||||
Load();
|
||||
if (DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>().useSaveLoadSystem)
|
||||
{
|
||||
Load();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
Save();
|
||||
if (DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>().useSaveLoadSystem)
|
||||
{
|
||||
Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace AppleHills.Core.Settings
|
||||
[Tooltip("Should Time.timeScale be set to 0 when the game is paused")]
|
||||
[SerializeField] public bool pauseTimeOnPauseGame = true;
|
||||
|
||||
[Header("Save Load Options")]
|
||||
[Tooltip("Should use save laod system?")]
|
||||
[SerializeField] public bool useSaveLoadSystem = true;
|
||||
|
||||
[Header("Logging Options")]
|
||||
[Tooltip("Logging level for bootstrap services")]
|
||||
[SerializeField] public LogVerbosity bootstrapLogVerbosity = LogVerbosity.Warning;
|
||||
|
||||
Reference in New Issue
Block a user