还原水插件

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

@@ -13,7 +13,7 @@ namespace WaveHarmonic.Crest
[ExecuteAlways, Utility.FilePath("Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset")]
[@HelpURL("Manual/Scripting.html#resources")]
sealed partial class WaterResources : Utility.ScriptableSingleton<WaterResources>
sealed class WaterResources : Utility.ScriptableSingleton<WaterResources>
{
[Serializable]
public sealed class ShaderResources
@@ -88,8 +88,6 @@ namespace WaveHarmonic.Crest
public ComputeShader _Whirlpool;
public ComputeShader _Clear;
public ComputeShader _Blit;
public ComputeShader _Blur;
}
#pragma warning disable IDE0032 // Use auto property
@@ -177,14 +175,8 @@ namespace WaveHarmonic.Crest
#if !CREST_DEBUG
hideFlags = HideFlags.NotEditable;
#endif
Initialize();
}
void Initialize()
{
Keywords.Initialize(this);
_ComputeLibrary = new(this);
AfterEnabled?.Invoke();
}
@@ -207,7 +199,7 @@ namespace WaveHarmonic.Crest
if (path.StartsWith("Packages/com.waveharmonic.crest") && path.EndsWith(".compute"))
{
// Unity loses these if the compute shader is recompiled.
Instance.Initialize();
Instance.Keywords.Initialize(Instance);
}
}
}