Skip to content

Commit af66fcf

Browse files
Internal/2022.3/staging
Internal/2022.3/staging
2 parents c864e99 + 480aef4 commit af66fcf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,9 @@ private static void GetEveryShaderFeatureAndUpdateURPAssets(List<ShaderFeatures>
378378
// Update the Prefiltering settings for this URP asset
379379
urpAsset.UpdateShaderKeywordPrefiltering(ref spd);
380380

381-
// Mark the asset dirty so it can be serialized once the build is finished
381+
// Save the asset before build
382382
EditorUtility.SetDirty(urpAsset);
383+
AssetDatabase.SaveAssetIfDirty(urpAsset);
383384
}
384385
}
385386
}
@@ -436,8 +437,9 @@ ref ssaoRendererFeatures
436437
// Update the Prefiltering settings for this URP asset
437438
urpAsset.UpdateShaderKeywordPrefiltering(ref spd);
438439

439-
// Mark the asset dirty so it can be serialized once the build is finished
440+
// Save the asset before build
440441
EditorUtility.SetDirty(urpAsset);
442+
AssetDatabase.SaveAssetIfDirty(urpAsset);
441443

442444
// Clean up
443445
ssaoRendererFeatures.Clear();

0 commit comments

Comments
 (0)