Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug DeclareDepthTexture changes between Unity Versions

Discussion in 'Universal Render Pipeline' started by Phantom_X, Mar 12, 2024.

  1. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    316
    Hi,
    Is this normal that the same URP version (14.0.10) code is different between 2 unity versions (2022.3.2 and 2022.3.21) ?



    This is causing a huge issue because the UNITY_VERSION is AFAIK the only way to have preprocessors in shaders to do different things based on the version.
    UNITY_VERSION preprocessor is clamped to 9 digits so it is impossible to know that we are on 2022.3.21

    Now if we can't rely on the UNITY_VERSION in our shaders and you change URP depending on unity double digits "bugfix" version it is impossible to make shaders that are compatible with all versions of unity.

    Thanks!