Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2021.2.X, 2022.1.X
"Couldn't open include file" error is thrown when compiling a Shader and Unity Accelerator is being used
How to reproduce:
1. In Unity Hub, add the user-submitted project
2. Under "Editor Version", click the three dots button and select "Add command line arguments"
3. In the "Add command line arguments here" textbox, add the argument "-disableShaderCacheRemote" and click "Save"
4. Launch the project
5. Open the Preferences window and set the Unity Accelerator default Mode to "Enabled" (Unity > Preferences... > Asset Pipeline > Default Mode)
6. Install Unity Accelerator (https://docs.unity3d.com/Manual/UnityAccelerator.html#installer)
7. In the last step of the installation process, copy the displayed Host IP address
8. In the Unity Editor Preferences window, paste the IP into the "Default IP address" field
9. In the project window, select the Asset "NewComputeShader" (Assets/NewComputeShader.compute)
10. In the Inspector window, select "Show compiled code"
11. Close the Unity Editor and in the OS File Browser, navigate to the project location
12. Rename the project folder and delete the Library folder inside
13. In Unity Hub, add the newly renamed project, add the "-disableShaderCacheRemote" command line argument and launch the project
14. In the project window, select the Asset "NewComputeShader" (Assets/NewComputeShader.compute)
15. In the Inspector window, select "Show compiled code"
16. Inspect the Console window (Window > General > Console)
Expected result: No errors are seen in the Console
Actual result: "Shader error in 'NewComputeShader'" error is seen in the Console
Reproducible with: 2021.2.0a21, 2021.2.9f1, 2022.1.0b5, 2022.2.0a2
Not reproducible with: 2019.4.35f1, 2020.3.27f1, 2021.2.0a20
Shader error in 'NewComputeShader': Couldn't open include file 'Test.cginc'. at kernel CSMain at NewComputeShader.compute(15)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- ‘[…] doesn't have a texture property '_MainTex’’ error when using Gizmos with [MainTexture] attribute
- "undefined symbol: WebView_loadHtml (referenced by top-level compiled C/C++ code)" errors when building a WebGL build
- Script recompiles in Play Mode when Script Changes While Playing option is set to Recompile After Finished Playing and Auto refresh is set to enabled.
- [Windows][Vulkan] Scrambled texture objects are rendered when setting one with Texture2D.UpdateExternalTexture
- NullReferenceException errors appear when using "select half" button