Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit ef5135f

Browse files
TJHeuvelChman
authored andcommitted
Getting a PropertySheet by shader name will now log the shader name when it cannot be found. Previously it would fail on another overload that cannot determine the shader name, this helps debugging user scripts.
1 parent 04caaaa commit ef5135f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

PostProcessing/Runtime/Utils/PropertySheetFactory.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ public PropertySheetFactory()
1414

1515
public PropertySheet Get(string shaderName)
1616
{
17-
return Get(Shader.Find(shaderName));
17+
var shader = Shader.Find(shaderName);
18+
19+
if (shader == null)
20+
throw new ArgumentException(string.Format("Invalid shader ({0})", shaderName));
21+
22+
return Get(shader);
1823
}
1924

2025
public PropertySheet Get(Shader shader)

0 commit comments

Comments
 (0)