Last improvements on the save front

This commit is contained in:
Michal Pikulski
2025-11-05 17:34:26 +01:00
parent 210823344a
commit c527ba334d
14 changed files with 610 additions and 176 deletions

View File

@@ -0,0 +1,31 @@
using UnityEngine;
using UnityEditor;
using Core.Lifecycle;
namespace Editor.Tools
{
/// <summary>
/// Editor utility to debug SaveIds for all ManagedBehaviours in the scene
/// </summary>
public class DebugSaveIds : EditorWindow
{
[MenuItem("Tools/Debug/Log All SaveIds")]
public static void LogAllSaveIds()
{
var allManaged = FindObjectsByType<ManagedBehaviour>(FindObjectsInactive.Include, FindObjectsSortMode.None);
Debug.Log($"=== Found {allManaged.Length} ManagedBehaviours ===");
foreach (var managed in allManaged)
{
if (managed.AutoRegisterForSave)
{
Debug.Log($"GameObject: {managed.gameObject.name} | Component: {managed.GetType().Name} | SaveID: {managed.SaveId}");
}
}
Debug.Log("=== End SaveIds ===");
}
}
}