暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UniversalRenderPipelineGlobalSettingsPostprocessor.cs 798B

1234567891011121314151617
  1. using System.Linq;
  2. using UnityEngine.Rendering.Universal;
  3. namespace UnityEditor.Rendering.Universal
  4. {
  5. //We ensure and save GS after each domain reload because we need to make them valid for AssetImportWorkers.
  6. //They will create render pipeline separately but they can't migrate or create new Assets.
  7. class UniversalRenderPipelineGlobalSettingsPostprocessor : AssetPostprocessor
  8. {
  9. const string k_GraphicsSettingsPath = "ProjectSettings/GraphicsSettings.asset";
  10. static void OnPostprocessAllAssets(string[] importedAssets , string[] __, string[] ___, string[] ____, bool didDomainReload)
  11. {
  12. if (didDomainReload || importedAssets.Contains(k_GraphicsSettingsPath))
  13. UniversalRenderPipelineGlobalSettings.Ensure();
  14. }
  15. }
  16. }