From 74326b1fb4a7276c19c7847963f490692e97ead0 Mon Sep 17 00:00:00 2001 From: Esmeralda Salamone Date: Mon, 1 Jul 2024 17:32:08 +0000 Subject: [PATCH] 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. --- .../Editor/ShaderGraph/Targets/UniversalTarget.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Targets/UniversalTarget.cs b/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Targets/UniversalTarget.cs index 86b97ff8529..7dfd89564e7 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Targets/UniversalTarget.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Targets/UniversalTarget.cs @@ -717,10 +717,10 @@ public void SetDataOnSubTarget(SubTarget subTarget) where T : JsonObject T data = null; foreach (var x in m_Datas.SelectValue()) { - if (x.GetType().Equals(typeof(T))) + if (x is T y) { - data = x as T; - continue; + data = y; + break; } }