Search Unity

Resolved [URP][2021.3.14f1] shader problem after building project

Discussion in 'Universal Render Pipeline' started by Dnurr, Nov 30, 2022.

  1. Dnurr

    Dnurr

    Joined:
    Nov 28, 2021
    Posts:
    17
    Solved by disabling bugged Render Feature in URP Asset.

    ----------------------------------------------------------------------------------------------------------------

    I have some problem after building my project. It remains on the gray screen (background of Unity logo) and doesn't load any element of the scene, except for the canvas elements.
    I built my project as developement build to check where is the problem and I've seen an error thrown on the console:

    ArgumentNullException: Value cannot be null.
    Parameter name: shader

    (The complete log is the following:)
    Code (CSharp):
    1.  
    2. ArgumentNullException: Value cannot be null.
    3. Parameter name: shader
    4.   at (wrapper managed-to-native) UnityEngine.Material.CreateWithShader(UnityEngine.Material,UnityEngine.Shader)
    5.   at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00008] in C:\build\output\unity\unity\Runtime\Export\Shaders\Material.bindings.cs:18
    6.   at VolumetricLightScattering+LightScatteringPass..ctor (VolumetricLightScatteringSettings settings) [0x0006b] in C:\GameDev\Myun\Assets\Scenes\RW\Scripts\VolumetricLightScattering.cs:40
    7.   at VolumetricLightScattering.Create () [0x00001] in C:\GameDev\Myun\Assets\Scenes\RW\Scripts\VolumetricLightScattering.cs:129
    8.   at UnityEngine.Rendering.Universal.ScriptableRenderer..ctor (UnityEngine.Rendering.Universal.ScriptableRendererData data) [0x00185] in C:\GameDev\Myun\Library\PackageCache\com.unity.render-pipelines.universal@12.1.8\Runtime\ScriptableRenderer.cs:541
    9.   at UnityEngine.Rendering.Universal.UniversalRenderer..ctor (UnityEngine.Rendering.Universal.UniversalRendererData data) [0x00038] in C:\GameDev\Myun\Library\PackageCache\com.unity.render-pipelines.universal@12.1.8\Runtime\UniversalRenderer.cs:169
    10.   at UnityEngine.Rendering.Universal.UniversalRendererData.Create () [0x00016] in C:\GameDev\Myun\Library\PackageCache\com.unity.render-pipelines.universal@12.1.8\Runtime\UniversalRendererData.cs:116
    11.   at UnityEngine.Rendering.Universal.ScriptableRendererData.InternalCreateRenderer () [0x00009] in C:\GameDev\Myun\Library\PackageCache\com.unity.render-pipelines.universal@12.1.8\Runtime\ScriptableRendererData.cs:68
    12.   at UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset.CreateRenderers () [0x00056] in C:\GameDev\Myun\Library\PackageCache\com.unity.render-pipelines.universal@12.1.8\Runtime\Data\UniversalRenderPipelineAsset.cs:450
    13.   at UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset.CreatePipeline () [0x00095] in C:\GameDev\Myun\Library\PackageCache\com.unity.render-pipelines.universal@12.1.8\Runtime\Data\UniversalRenderPipelineAsset.cs:400
    14.   at UnityEngine.Rendering.RenderPipelineAsset.InternalCreatePipeline () [0x00004] in C:\build\output\unity\unity\Runtime\Export\RenderPipeline\RenderPipelineAsset.cs:10
    15. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    16. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    17. UnityEngine.Logger:LogException(Exception, Object)
    18. UnityEngine.Debug:LogException(Exception)
    19. UnityEngine.Rendering.RenderPipelineAsset:InternalCreatePipeline() (at C:\build\output\unity\unity\Runtime\Export\RenderPipeline\RenderPipelineAsset.cs:18)
    20. UnityEngine.Rendering.RenderPipelineManager:PrepareRenderPipeline(RenderPipelineAsset) (at C:\build\output\unity\unity\Runtime\Export\RenderPipeline\RenderPipelineManager.cs:129)
    21. UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, List`1) (at C:\build\output\unity\unity\Runtime\Export\RenderPipeline\RenderPipelineManager.cs:100)
    22.  
    23. (Filename: C:/build/output/unity/unity/Runtime/Export/Shaders/Material.bindings.cs Line: 18)
    24.  
    (I upload only a slice of the log because the error is the same, repeated too much times)

    The "big" problem, now, is that the path C:/build/output/unity/unity/Runtime/Export/Shaders/ doesn't exists, the same thing is for the file Material.bindings.cs.

    I tried to remove and readd URP and update Unity Editor to the new version (.8f1 -> .14f1), but the problem persists.

    In this thread I upload the screen of the game without canvas.
     

    Attached Files:

    Last edited: Dec 4, 2022