还原水插件

This commit is contained in:
2026-03-05 00:14:42 +08:00
parent 0de35591e7
commit e82f2ea6b7
270 changed files with 2773 additions and 12445 deletions

View File

@@ -5,7 +5,6 @@ using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using WaveHarmonic.Crest.Internal.Compatibility;
namespace WaveHarmonic.Crest.Examples
{
@@ -22,7 +21,7 @@ namespace WaveHarmonic.Crest.Examples
#pragma warning restore 414
#if UNITY_EDITOR
static ulong s_Scene;
static int s_Scene;
static bool s_SceneChanged;
[InitializeOnLoadMethod]
@@ -30,16 +29,16 @@ namespace WaveHarmonic.Crest.Examples
{
EditorSceneManager.sceneClosed -= OnSceneClosed;
EditorSceneManager.sceneClosed += OnSceneClosed;
s_Scene = SceneManager.GetActiveScene().GetRawSceneHandle();
s_Scene = SceneManager.GetActiveScene().handle;
}
static void OnSceneClosed(Scene a)
{
// TODO: Report to Unity
// Does not work if only game view is open. Handles will never update.
if (s_Scene == a.GetRawSceneHandle()) return;
if (s_Scene == a.handle) return;
s_SceneChanged = true;
s_Scene = a.GetRawSceneHandle();
s_Scene = a.handle;
}
void OnEnable()