stash work

This commit is contained in:
Michal Pikulski
2025-10-16 16:18:04 +02:00
parent c7906a9968
commit d2c6c5df38
19 changed files with 353 additions and 277 deletions

View File

@@ -16,26 +16,11 @@ namespace Core
private LoadingScreenController _loadingScreen;
private static SceneManagerService _instance;
private static bool _isQuitting = false;
/// <summary>
/// Singleton instance of the SceneManagerService.
/// Singleton instance of the SceneManagerService. No longer creates an instance if one doesn't exist.
/// </summary>
public static SceneManagerService Instance
{
get
{
if (_instance == null && Application.isPlaying && !_isQuitting)
{
_instance = FindAnyObjectByType<SceneManagerService>();
if (_instance == null)
{
var go = new GameObject("SceneManagerService");
_instance = go.AddComponent<SceneManagerService>();
// DontDestroyOnLoad(go);
}
}
return _instance;
}
}
public static SceneManagerService Instance => _instance;
// Events for scene lifecycle
public event Action<string> SceneLoadStarted;
@@ -99,11 +84,6 @@ namespace Core
}
}
void Start()
{
// LoadingScreen setup moved to InitializePostBoot
}
private void InitializePostBoot()
{
// Set up loading screen reference and events after boot is complete