Skip to content

Commit 06384bc

Browse files
committed
2018.1+ compatibility
1 parent a5e50af commit 06384bc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

UnityEngine.AssetGraph/Editor/System/AssetGenerators/CreateMaterialFromTexture.cs

+8
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ public float FloatValue
5454
[SerializeField] public string m_propertyName;
5555
[SerializeField] public List<PropertyField> m_properties;
5656

57+
#if !UNITY_2018_1_OR_NEWER
5758
private ColorPickerHDRConfig m_hdrConfig;
59+
#endif
5860

5961
public void OnValidate()
6062
{
@@ -174,10 +176,12 @@ public void OnInspectorGUI(Action onValueChanged)
174176
onValueChanged();
175177
}
176178

179+
#if !UNITY_2018_1_OR_NEWER
177180
if (m_hdrConfig == null)
178181
{
179182
m_hdrConfig = new ColorPickerHDRConfig(0f, 10f, 0f, 10f);
180183
}
184+
#endif
181185

182186
var refMat =
183187
(Material) EditorGUILayout.ObjectField("Reference Material", m_referenceMat.Object, typeof(Material),
@@ -339,8 +343,12 @@ private void DrawPropertyGUI(PropertyField field, Action onValueChanged, ref Pro
339343
break;
340344
case PropertyType.Color:
341345
{
346+
#if !UNITY_2018_1_OR_NEWER
342347
var v = EditorGUILayout.ColorField(new GUIContent("Color"), field.colorValue, true, true, true,
343348
m_hdrConfig);
349+
#else
350+
var v = EditorGUILayout.ColorField(new GUIContent("Color"), field.colorValue, true, true, true);
351+
#endif
344352
if (v != field.colorValue)
345353
{
346354
field.colorValue = v;

0 commit comments

Comments
 (0)