移除水

This commit is contained in:
2025-06-21 21:58:06 +08:00
parent d61516a576
commit e9f76d0f11
1566 changed files with 9218 additions and 300913 deletions

View File

@@ -1,39 +0,0 @@
// Crest Water System
// Copyright © 2024 Wave Harmonic. All rights reserved.
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace WaveHarmonic.Crest.Editor
{
static class Utility
{
static int s_LastCheckedForWater = -1;
static WaterRenderer s_Water;
public static WaterRenderer Water
{
get
{
if (s_LastCheckedForWater == Time.frameCount)
{
return s_Water;
}
s_LastCheckedForWater = Time.frameCount;
// Gets the water from the current stage.
return s_Water = UnityEditor.SceneManagement.StageUtility
.GetCurrentStageHandle()
.FindComponentsOfType<WaterRenderer>()
.FirstOrDefault();
}
}
[InitializeOnEnterPlayMode]
static void OnEnterPlayMode()
{
s_LastCheckedForWater = -1;
}
}
}