From 8e93d400332f3a9e9d1e79698dc6470003b89af7 Mon Sep 17 00:00:00 2001 From: Michal Pikulski Date: Mon, 29 Sep 2025 13:25:22 +0200 Subject: [PATCH] All working with the build - update initialization order for the ItemManager --- Assets/Scripts/Core/ItemManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Core/ItemManager.cs b/Assets/Scripts/Core/ItemManager.cs index aee51ecc..43647028 100644 --- a/Assets/Scripts/Core/ItemManager.cs +++ b/Assets/Scripts/Core/ItemManager.cs @@ -69,14 +69,14 @@ namespace Core { // Subscribe to scene load completed so we can clear registrations when scenes change // Access Instance directly to ensure the service is initialized and we get the event hookup. - SceneManagerService.Instance.SceneLoadCompleted += OnSceneLoadCompleted; + SceneManagerService.Instance.SceneLoadStarted += OnSceneLoadStarted; } void OnDestroy() { // Unsubscribe from SceneManagerService if (SceneManagerService.Instance != null) - SceneManagerService.Instance.SceneLoadCompleted -= OnSceneLoadCompleted; + SceneManagerService.Instance.SceneLoadStarted -= OnSceneLoadStarted; // Ensure we clean up any subscriptions from registered items when the manager is destroyed ClearAllRegistrations(); @@ -87,7 +87,7 @@ namespace Core _isQuitting = true; } - private void OnSceneLoadCompleted(string sceneName) + private void OnSceneLoadStarted(string sceneName) { // Clear all registrations when a new scene is loaded, so no stale references persist ClearAllRegistrations();