Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.1.0b1
2018.2.9f1
Issue ID
1085660
Regression
Yes
[ScriptedImporter] Imported Shaders do not show errors in the Object
Reproduction steps:
1. Open "ShaderImporter.zip" project
2. Select and Reimport "shaderToImport"
3. See "Scripted Shader Imported(Script)" -> "Errors" -> "Did not find shader kernel 'vert______error' to compile"
4. "Compile and show code"
5. The Error is now displayed on the Object
Expected Result: The error is displayed from the moment the Shader is imported
Actual Result: The error is displayed only when Compiled and Opened
Reproduced with: 2019.1.0a3, 2018.3.0b4, 2018.2.11f1, 2018.1.9f2, 2018.1.0b1
Did not reproduce on: 2018.1.0a7, 2017.4.12f1 (Seems like ScriptedImporter importing shaders only works from 2018.1.0b1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Foldout arrow indent is misaligned in the Inspector when used in Custom Type
- [Android] The Player screen turns black when playing a video under certain conditions
- Search window icons at the bottom are cut off when Search window is resized vertically
- "Try something else?" text label is cut off when searching for a long text in the Search window
- Rendering Debugger window sections do not have a minimum width set when resizing with the slider in the middle of the window
Resolution Note (2018.3.X):
Using "ShaderUtil.CreateShaderAsset("");" during a scripted importer "OnImportAsset" will not create a GUID. Shader error messages are saved in the "ShaderCache.db" using the GUID as a key, that is not available in this context.
The workaround of using an "AssetPostprocessor::OnPostprocessAllAssets" provides the functionality that is wanted, because during the "AssetPostprocessor::OnPostprocessAllAssets" the shader has been given a valid GUID and then the error will be correctly saved in the "ShaderCache.db" and displayed in the asset inspector as requested.