I'm using Unity 2021.3.6f1 (MacOS silicon) and URP Version 12.1.7 - June 30, 2022
I'm registering a delegate with `RenderPipelineManager.beginContextRendering += OnBeginContextRendering;`
private void OnBeginContextRendering(ScriptableRenderContext context, List cameras)
{
Debug.Log($"OnBeginContextRendering {Time.frameCount}, {context.GetHashCode()}");
}
Which gets called twice.
First invocation:
OnBeginContextRendering 44, 1805453000
UnityEngine.Debug:Log (object)
RenderingManager:OnBeginContextRendering (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1) (at Assets/Scripts/Graphics/RenderingManager.cs:110)
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,System.Collections.Generic.List`1,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle) (at /Users/bokken/buildslave/unity/build/Runtime/Export/RenderPipeline/RenderPipelineManager.cs:115)
Second invocation:
OnBeginContextRendering 44, 1805420448
UnityEngine.Debug:Log (object)
RenderingManager:OnBeginContextRendering (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1) (at Assets/Scripts/Graphics/RenderingManager.cs:110)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
Is this a bug? How should I discrimate between the two invocations? Why is a GUIUtility invoking a SRP delegate?
↧