升级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

@@ -117,6 +117,11 @@ namespace WaveHarmonic.Crest.Editor.Build
ProjectSettings _Settings;
WaterResources _Resources;
static readonly string[] s_LightMapKeywords =
{
"LIGHTMAP_ON", "DIRLIGHTMAP_COMBINED", "DYNAMICLIGHTMAP_ON", "LIGHTMAP_SHADOW_MIXING", "SHADOWS_SHADOWMASK"
};
void Logger(string message)
{
Debug.Log(message);
@@ -210,6 +215,24 @@ namespace WaveHarmonic.Crest.Editor.Build
}
}
// Strip lightmap variants.
// Unity strips these unless they are used by any shader once in the scene, then
// they are always included. Seems like a bug. To test, make sure lightmaps are
// set up, and there is a static object in the scene. Or set the following:
// Project Settings > Graphics > Shader Stripping > Lightmap Modes
foreach (var keyword in keywords)
{
if (s_LightMapKeywords.Contains(keyword.name))
{
if (_Settings.LogStrippedVariants)
{
Logger($"Stripping Keyword: {keyword.name}");
}
return true;
}
}
return false;
}