Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Editor simulation breaks without domain reload

Discussion in 'AR' started by Falondrian, Oct 5, 2022.

  1. Falondrian

    Falondrian

    Joined:
    Nov 1, 2017
    Posts:
    72
    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()
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    793
  3. Falondrian

    Falondrian

    Joined:
    Nov 1, 2017
    Posts:
    72
    Sure, here you go: IN-18899
     
    andyb-unity likes this.
  4. Falondrian

    Falondrian

    Joined:
    Nov 1, 2017
    Posts:
    72
    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)
     
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    793
    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?
     
  6. Stents

    Stents

    Joined:
    Jan 23, 2014
    Posts:
    18
    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: https://docs.unity3d.com/Manual/DomainReloading.html

    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.
     
    Falondrian likes this.
  7. Falondrian

    Falondrian

    Joined:
    Nov 1, 2017
    Posts:
    72
    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.
     
  8. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    793
    @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.
     
    Stents and KyryloKuzyk like this.