Search Issue Tracker

Fixed in 2020.2

Fixed in 2020.1



Found in

Issue ID




[Caching Shader Preprocessor] Platform keywords affect #pragma parameters



Platform keywords that only depend on current build target are treated as regular keywords and do not allow #pragma parameter selection.

1. Make an empty project (any pipe), standalone build target.
2. Go to project settings -> editor settings, turn Caching shader preprocessor on.
3. Add attched shader to the project. Create a cube and a new material, assign the material to the cube, assign the attached shader to the material.
4. Observe the cube is green.
5. Select the attached shader, observe two improt warnings.

Expected: no warnings, cube is red.

Comments (2)

  1. 973227956e3d8eda18a3570d768711ba?d=mm


    Jul 13, 2020 12:23

    Thanks for sharing the information about the platform keywords and #pragma parameters. You gave a step by step instruction and easy to understand. I like your post, and it gave me more information. Keep sharing this kind of information for us. I am looking for more updates.

  2. Ae9debf322ad4ea283f301330b475780?d=mm


    Mar 11, 2020 11:26

    It is really an informative article and it gives me an idea about platform keywords and #pragma parameters.
    You gave detailed step by step descriptions and it is easily understandable. Is this platform keywords are treated as regular keywords? can you please explain it in detail.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.