From 7a6c2518f36a27376e81c225ad4fe0b375a1ed57 Mon Sep 17 00:00:00 2001 From: VladV Date: Wed, 25 May 2022 11:07:43 +0300 Subject: [PATCH] Fix UnityEngine.Object fields drawn as reference instead of primitive --- Editor/TriProperty.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Editor/TriProperty.cs b/Editor/TriProperty.cs index 8fdc6cd..48069a7 100644 --- a/Editor/TriProperty.cs +++ b/Editor/TriProperty.cs @@ -575,7 +575,8 @@ namespace TriInspector } if (property._definition.FieldType.IsPrimitive || - property._definition.FieldType == typeof(string)) + property._definition.FieldType == typeof(string) || + typeof(UnityEngine.Object).IsAssignableFrom(property._definition.FieldType)) { return TriPropertyType.Primitive; }