Skip to content

Commit 74326b1

Browse files
Esmeralda SalamoneEvergreen
Esmeralda Salamone
authored and
Evergreen
committed
init
I landed a fix for this issue, but needed to change it for a test and accidentally created a slightly different issue on account of a typo. This is a cleaner solution.
1 parent f6518e1 commit 74326b1

File tree

1 file changed

+3
-3
lines changed
  • Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Targets

1 file changed

+3
-3
lines changed

Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Targets/UniversalTarget.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -717,10 +717,10 @@ public void SetDataOnSubTarget<T>(SubTarget subTarget) where T : JsonObject
717717
T data = null;
718718
foreach (var x in m_Datas.SelectValue())
719719
{
720-
if (x.GetType().Equals(typeof(T)))
720+
if (x is T y)
721721
{
722-
data = x as T;
723-
continue;
722+
data = y;
723+
break;
724724
}
725725
}
726726

0 commit comments

Comments
 (0)