修改水

This commit is contained in:
2026-01-01 22:00:33 +08:00
parent 040a222bd6
commit 9ceffccd39
1800 changed files with 103929 additions and 139495 deletions

View File

@@ -0,0 +1,32 @@
// Crest Water System
// Copyright © 2024 Wave Harmonic. All rights reserved.
#if UNITY_EDITOR
using UnityEngine;
using WaveHarmonic.Crest.Editor;
namespace WaveHarmonic.Crest
{
// Edit Mode.
partial class UnderwaterRenderer
{
static bool IsFogEnabledForEditorCamera(Camera camera)
{
// Check if scene view has disabled fog rendering.
if (camera.cameraType == CameraType.SceneView)
{
var sceneView = EditorHelpers.GetSceneViewFromSceneCamera(camera);
// Skip rendering if fog is disabled or for some reason we could not find the scene view.
if (sceneView == null || !sceneView.sceneViewState.fogEnabled)
{
return false;
}
}
return true;
}
}
}
#endif