Search Issue Tracker

Fixed in 2022.2.X

Fixed in 2021.3.X, 2022.1.X

Votes

0

Found in

2020.3

2021.2

2022.1

2022.2

Issue ID

1401580

Regression

No

Editing Shader includes does not always update Shaders when changes are made in script

Shader System

-

Reproduction steps:
1. Open the attached Unity project "ShaderIssue.zip" from Google Drive (link in the edit)
2. In the Project window navigate to SampleScenes folder > SimpleExample folder and open "SimpleBRGExample.unity" Scene
3. Enter Play mode and observe blue cubes in the Game view
4. Exit the Play mode, navigate to Packages folder > Core RP Library folder > ShaderLibrary folder and open the "UnityDOTSInstancing.hlsl" script
5. In script file change 332 line from "static const half4 DebugColor = half4(0, 0, 1, 1);" to "static const half4 DebugColor = half4(1, 0, 0, 1);" and save the script
6. Go back to the Editor, enter the Play mode, and observe that the color of the cubes did not change from blue to red
7. Exit the Play mode, navigate to Packages folder > Universal RP folder > Shaders folder, and open "LitForwardPass.hlsl" script
8. Make any edit in the script (for example add an empty line somewhere) and save it
9. Go back to the Editor, enter the Play mode, and observe that the cubes changed color to red

Expected result: Editor is correctly picking up color changes inside the "UnityDOTSInstancing.hlsl" script
Actual result: Editor is not picking up color changes inside the "UnityDOTSInstancing.hlsl" script

Reproducible with: 2022.1.0b10, 2022.2.0a6
Could not test with: 2019.4.36f1, 2020.3.29f1, 2021.2.14f1 (Errors in the Console window after downgrading project)

  1. Resolution Note (fix version 2022.2):

    Fixed in 2022.2.0a15

  2. Resolution Note (fix version 2022.1):

    Fixed in 2022.1.2f1

  3. Resolution Note (fix version 2021.3):

    Fixed in 2021.3.4f1

Add comment

Log in to post comment