Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug (Case 1342654) "Invalid conditional expression" error on shader import

Discussion in '2021.2 Beta' started by Peter77, Jun 12, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,620
    Unity 2021.2.0a20 outputs "Invalid conditional expression" for the shader found in bug-report Case 1342654. Unity 2019.4.20f1 does not output the error.
     
    LeonhardP likes this.
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Hi, thanks for the bug report!
    You can work around this by forcing the platform preprocessor for the shader (check the top section of the shader inspector).
     
    LeonhardP likes this.
  3. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    I checked the error source - you can work around by changing "#if DIRECTIONAL && LIGHTWRAP" to "#if defined(DIRECTIONAL) && LIGHTWRAP" while the fix is on its way.
     
    Peter77 likes this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,620
    I just received the following message from QA:
    https://issuetracker.unity3d.com/is...ine-202-is-thrown-when-reimporting-the-shader

    thumbs up to everyone involved!
     
    LeonhardP and aleksandrk like this.