升级6.4.升级水,升级天气

This commit is contained in:
2026-04-05 00:26:54 +08:00
parent 63bc9b5536
commit 5f7cbfb713
635 changed files with 34718 additions and 22567 deletions

View File

@@ -5,6 +5,7 @@ using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using WaveHarmonic.Crest.Internal;
namespace WaveHarmonic.Crest.Examples
{
@@ -13,15 +14,10 @@ namespace WaveHarmonic.Crest.Examples
#endif
[ExecuteAlways]
[RequireComponent(typeof(Camera))]
sealed class AlignSceneViewToCamera : MonoBehaviour
sealed class AlignSceneViewToCamera : CustomBehaviour
{
[SerializeField, HideInInspector]
#pragma warning disable 414
int _Version = 0;
#pragma warning restore 414
#if UNITY_EDITOR
static int s_Scene;
static ulong s_Scene;
static bool s_SceneChanged;
[InitializeOnLoadMethod]
@@ -29,20 +25,22 @@ namespace WaveHarmonic.Crest.Examples
{
EditorSceneManager.sceneClosed -= OnSceneClosed;
EditorSceneManager.sceneClosed += OnSceneClosed;
s_Scene = SceneManager.GetActiveScene().handle;
s_Scene = SceneManager.GetActiveScene().GetRawSceneHandle();
}
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.handle) return;
if (s_Scene == a.GetRawSceneHandle()) return;
s_SceneChanged = true;
s_Scene = a.handle;
s_Scene = a.GetRawSceneHandle();
}
void OnEnable()
private protected override void OnEnable()
{
base.OnEnable();
EditorApplication.update -= EditorUpdate;
EditorApplication.update += EditorUpdate;
}