Skip to content

Commit dd3e6bf

Browse files
author
Antoine Lelièvre
committed
Fixed object field creation with null values
1 parent 355563e commit dd3e6bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Assets/com.alelievr.NodeGraphProcessor/Editor/Utils/FieldFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public static VisualElement CreateField(Type fieldType, object value, Action< ob
156156
} catch {}
157157

158158
// handle the Object field case
159-
if (field == null && value is UnityEngine.Object)
159+
if (field == null && (value == null || value is UnityEngine.Object))
160160
{
161161
createFieldSpecificMethod = createFieldMethod.MakeGenericMethod(typeof(UnityEngine.Object));
162162
field = createFieldSpecificMethod.Invoke(null, new object[]{value, onValueChanged, label}) as VisualElement;

0 commit comments

Comments
 (0)