Files
Fishing2/Assets/Procedural Worlds/GeNa/Scripts/External/Editor/PostProcessingBugFix.cs
2026-02-28 12:43:44 +08:00

29 lines
859 B
C#

using UnityEditor;
#if UNITY_POST_PROCESSING_STACK_V2
using UnityEditorInternal;
using UnityEngine.Rendering.PostProcessing;
#endif
namespace GeNa.Core
{
[InitializeOnLoad]
public class PostProcessingBugFix
{
private static bool m_isDirty = true;
static PostProcessingBugFix()
{
EditorApplication.update += Update;
}
private static void Update()
{
if (m_isDirty)
{
#if UNITY_POST_PROCESSING_STACK_V2
PostProcessVolume postProcessVolume = UnityEngine.Object.FindObjectOfType<PostProcessVolume>();
InternalEditorUtility.SetIsInspectorExpanded(postProcessVolume, true);
InternalEditorUtility.SetIsInspectorExpanded(postProcessVolume, false);
#endif
m_isDirty = false;
}
}
}
}