From 480aef405574b6f14ce427ab00a4c20cd1cea078 Mon Sep 17 00:00:00 2001 From: Clara Kang Date: Fri, 21 Nov 2025 18:34:21 +0000 Subject: [PATCH] [Port] [2022.3] [UUM-126809] Save renderPipelineAsset before build --- .../Editor/ShaderBuildPreprocessor.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs b/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs index 73cbcbdb5c5..8a8f0088e9f 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs @@ -378,8 +378,9 @@ private static void GetEveryShaderFeatureAndUpdateURPAssets(List // Update the Prefiltering settings for this URP asset urpAsset.UpdateShaderKeywordPrefiltering(ref spd); - // Mark the asset dirty so it can be serialized once the build is finished + // Save the asset before build EditorUtility.SetDirty(urpAsset); + AssetDatabase.SaveAssetIfDirty(urpAsset); } } } @@ -436,8 +437,9 @@ ref ssaoRendererFeatures // Update the Prefiltering settings for this URP asset urpAsset.UpdateShaderKeywordPrefiltering(ref spd); - // Mark the asset dirty so it can be serialized once the build is finished + // Save the asset before build EditorUtility.SetDirty(urpAsset); + AssetDatabase.SaveAssetIfDirty(urpAsset); // Clean up ssaoRendererFeatures.Clear();