Skip to content

Commit 095ecfd

Browse files
authored
Fixed: Null reference exception when the HDRP tesselation shader is applied . (#327)
1 parent 660f671 commit 095ecfd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

com.unity.toonshader/CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
2-
## [0.9.5-preview] - 2023-06-18
3-
TBD - not released yet.
2+
## [0.9.5-preview] - 2023-08-25
3+
### Fixed
4+
* A URP Shader error when using newer than 2023.1.3.
5+
* A Null Reference Exception error with HDRP tesslation shader.
46

57
## [0.9.4-preview] - 2023-05-01
68
* Added a exlanation for URP line issue into Kown Issues.

com.unity.toonshader/Editor/HDRP/HDRPToonGUI-Tessellation.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ void DrawDelayedFloatProperty(MaterialProperty prop, GUIContent content)
9999
void TessellationModePopup()
100100
{
101101
EditorGUI.showMixedValue = tessellationMode.hasMixedValue;
102-
var mode = (TessellationMode)tessellationMode.floatValue;
102+
TessellationMode mode = TessellationMode.None;
103+
mode = (TessellationMode)tessellationMode?.floatValue;
103104

104105
EditorGUI.BeginChangeCheck();
105106
mode = (TessellationMode)EditorGUILayout.Popup(TessellationStyles.tessellationModeText, (int)mode, TessellationStyles.tessellationModeNames);

0 commit comments

Comments
 (0)