Files
Hasebe/Library/PackageCache/com.unity.render-pipelines.universal@0ffb3d4f1461/Editor/AssetPostProcessors/UniversalRenderPipelineGlobalSettingsPostprocessor.cs
T
2026-09-25 00:42:08 +03:00

18 lines
798 B
C#

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