Editor simulation breaks without domain reload

,

Hello,

the in-editor simulation is currently not compatible with Project Settings → Editor → Reload Domain disabled.

The following exception is thrown every frame when entering play mode twice without domain reload:

[Exception] ArgumentNullException: Value cannot be null.
Parameter name: mesh
CommandBuffer.DrawMesh() at <86acb61e0d2b4b36bc20af11093be9a5>:0

CommandBuffer.DrawMesh() at <86acb61e0d2b4b36bc20af11093be9a5>:0

CommandBuffer.DrawMesh() at <86acb61e0d2b4b36bc20af11093be9a5>:0

CommandBuffer.DrawMesh() at <86acb61e0d2b4b36bc20af11093be9a5>:0

ARBackgroundRendererFeature+ARCameraBackgroundRenderPass.Execute() at Library/PackageCache/com.unity.xr.arfoundation@5.0.2/Runtime/ARFoundation/ARBackgroundRendererFeature.cs:175

ScriptableRenderer.ExecuteRenderPass() at Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/ScriptableRenderer.cs:1004

ScriptableRenderer.ExecuteBlock() at Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/ScriptableRenderer.cs:963

ScriptableRenderer.Execute() at Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/ScriptableRenderer.cs:752

UniversalRenderPipeline.RenderSingleCamera() at Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/UniversalRenderPipeline.cs:415

UniversalRenderPipeline.RenderCameraStack() at Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/UniversalRenderPipeline.cs:572

UniversalRenderPipeline.Render() at Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/UniversalRenderPipeline.cs:265

RenderPipeline.InternalRender() at <86acb61e0d2b4b36bc20af11093be9a5>:0

RenderPipelineManager.DoRenderLoop_Internal() at <86acb61e0d2b4b36bc20af11093be9a5>:0

GUIUtility.ProcessEvent()

Hmm, nice catch! Can you file a bug so this gets into our QA triage, then post the bug number in this thread? Unity QA: Building quality with passion

Sure, here you go: IN-18899

1 Like

Hi @andyb-unity , QA closed the issue again because apparently domain reload options are an experimental feature (which it hasn’t been for quite while)

Thanks for following up. We are closing these issues as Won’t Fix for now. The XR Simulation life cycle requires domain reload, and it would be a significant commitment for us to change this.

I’m curious what is your use case for disabling domain reload?

Thanks for your update @andyb-unity . This is disappointing that it will not be supported though. I assume the main use case for most users is to greatly reduce iteration time when frequently starting and stopping play mode, as is suggested in the Unity documentation: Unity - Manual: Domain Reloading

Even on mid-high end machines, entering play mode can take up to 5-10 seconds or more on larger projects, and with domain reloading disabled it is near instant. Since the main purpose of simulation for us is in being able to use it for rapid iteration, this is one reason we are currently just sticking with our own custom Simulation systems for now. The lack of support for some important features like environment depth etc is also holding us back on using it currently.

1 Like

This. I carefully wrote all code to support domain reload disabling because it speeds up entering playmode by 10 seconds. I will definitely not enable it again.

@Stents @Falondrian Thanks for this feedback. I’ll pass this along. No ETA on Occlusion subsystem support in XR Simulation yet but that is definitely on our road map already.

2 Likes