Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug 2 Errors when building with Entities.Graphics + URP in a URP-Shader

Discussion in 'Graphics for ECS' started by Nefahl, Aug 30, 2023.

  1. Nefahl

    Nefahl

    Joined:
    Feb 20, 2017
    Posts:
    82
    Hello there!

    I just tried to switch some parts of a project of mine to the ecs workflow, but I didn't even came to changing anything really yet because I tried if everything still works fine by building etc. after importing and activating all the necessary packages.

    The project used URP and is built with IL2CPP if that matters.

    The first problem that occured I couldn't activate SRP batching on the URP-Config objects since the advanced-section of the script is not there, also already mentioned that in the docs where it's described that it needs to be active.
    upload_2023-8-30_10-31-16.png
    The way to solve that was to enable the debug-mode of the inspector where I could toggle it on which fixed the "SRP batching has to be ON" error.
    upload_2023-8-30_10-31-27.png

    So all looked fine, no errors. So I hit the build button in the build settings and the build finishes with success (kind of), but there are two errors in the console.

    Shader error in 'Universal Render Pipeline/Particles/Unlit': out parameters require l-value arguments at /[ProjectDir]/Library/PackageCache/com.unity.render-pipelines.universal@14.0.8/ShaderLibrary/ParticlesInstancing.hlsl(57) (on d3d11)
    Compiling Subshader: 0, Pass: ForwardLit, Vertex program with DOTS_INSTANCING_ON PROCEDURAL_INSTANCING_ON
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS​

    Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _DISTORTION_ON _FADING_ON _FLIPBOOKBLENDING_ON _NORMALMAP _SOFTPARTICLES_ON
    And:

    Shader error in 'Universal Render Pipeline/Particles/Unlit': undeclared identifier 'unity_WorldToObject' at /[ProjectDir]/Library/PackageCache/com.unity.render-pipelines.universal@14.0.8/ShaderLibrary/ParticlesInstancing.hlsl(57) (on d3d11)
    Compiling Subshader: 0, Pass: ForwardLit, Vertex program with DOTS_INSTANCING_ON PROCEDURAL_INSTANCING_ON
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _DISTORTION_ON _FADING_ON _FLIPBOOKBLENDING_ON _NORMALMAP _SOFTPARTICLES_ON
    ̶A̶l̶s̶o̶ ̶w̶h̶e̶n̶ ̶s̶t̶a̶r̶t̶i̶n̶g̶ ̶t̶h̶e̶ ̶b̶u̶i̶l̶d̶ ̶I̶ ̶j̶u̶s̶t̶ ̶g̶e̶t̶ ̶a̶ ̶m̶a̶g̶e̶n̶t̶a̶ ̶s̶c̶r̶e̶e̶n̶ ̶n̶o̶w̶ ̶(̶d̶o̶n̶'̶t̶ ̶k̶n̶o̶w̶ ̶i̶f̶ ̶a̶n̶y̶t̶h̶i̶n̶g̶ ̶e̶l̶s̶e̶ ̶w̶o̶r̶k̶s̶ ̶a̶s̶ ̶e̶x̶p̶e̶c̶t̶e̶d̶,̶ ̶g̶o̶t̶ ̶n̶o̶ ̶s̶o̶u̶n̶d̶s̶ ̶e̶t̶c̶ ̶y̶e̶t̶)̶.̶

    That was an issue on my part, the errors above still popup, I don't use particles with the material yet (pretty early in project no real visuals yet)
     
    Last edited: Aug 30, 2023
    unity_ONrjtbKFrbybgg likes this.
  2. Nefahl

    Nefahl

    Joined:
    Feb 20, 2017
    Posts:
    82
    I'm kind of lost here, since I don't know how to address this, for further context:

    Unity: 2022.3.8f1
    Package (and dependencies) versions:
    upload_2023-8-30_10-36-55.png
    upload_2023-8-30_10-37-5.png
     
    unity_ONrjtbKFrbybgg likes this.
  3. MagicGameArt

    MagicGameArt

    Joined:
    Sep 30, 2016
    Posts:
    3
    I have the same problem with shader errors and all my custom shaders are purple on build but in editor they works fine. I update Unity version from 2022.3.2 to 2022.3.10. It's look like i will need rollback
     
  4. nopact_can

    nopact_can

    Joined:
    Feb 10, 2016
    Posts:
    2
    Is there any update on this issue? in Unity 2022.3.9f1, OpenGl android project, I am seeing the exact errors on console during build. Build works fine, but freezes without error report some times. I wonder if those are related.