diff --git a/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs b/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs index e5a80f2b2fb..271ae50bb46 100644 --- a/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs +++ b/com.unity.shadergraph/Editor/Drawing/Views/IdentifierField.cs @@ -2,6 +2,9 @@ using UnityEngine; using UnityEngine.UIElements; +// This is to ensure backwards compatibility since TextValueField, TextValueFieldTraits and DeltaSpeed were moved from UnityEditor.UIElements to UnityEngine.UIElements. +using UnityEditor.UIElements; + namespace UnityEditor.ShaderGraph.Drawing { /* @@ -9,12 +12,12 @@ Field that allows entering a valid HLSL identifier. (variable name, function name, ...) this means no spaces, no funny characters, never starts with a number, ... */ - public class IdentifierField : UIElements.TextValueField + public class IdentifierField : TextValueField { IdentifierInput tsInput => (IdentifierInput)textInputBase; public new class UxmlFactory : UxmlFactory { } - public new class UxmlTraits : UIElements.TextValueFieldTraits { } + public new class UxmlTraits : TextValueFieldTraits { } protected override string ValueToString(string v) { @@ -52,7 +55,7 @@ public IdentifierField() : this((string)null) { } tsInput.AddToClassList(inputUssClassName); } - public override void ApplyInputDeviceDelta(Vector3 delta, UIElements.DeltaSpeed speed, string startValue) + public override void ApplyInputDeviceDelta(Vector3 delta, DeltaSpeed speed, string startValue) { tsInput.ApplyInputDeviceDelta(delta, speed, startValue); } @@ -71,7 +74,7 @@ protected override string allowedCharacters get { return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; } } - public override void ApplyInputDeviceDelta(Vector3 delta, UIElements.DeltaSpeed speed, string startValue) + public override void ApplyInputDeviceDelta(Vector3 delta, DeltaSpeed speed, string startValue) { }