From b42693219d9a007ea6d10f2688eb19a9f165628e Mon Sep 17 00:00:00 2001 From: Merlin <36685500+Merlin-san@users.noreply.github.com> Date: Thu, 14 Jan 2021 13:54:40 -0800 Subject: [PATCH] Fix issue where exposure tree loops endlessly when Odin is imported - A type's FullName property is null on some Odin types, so skip them. Reported by Code-L --- Assets/UdonSharp/Editor/Editors/UdonTypeExposureTree.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/UdonSharp/Editor/Editors/UdonTypeExposureTree.cs b/Assets/UdonSharp/Editor/Editors/UdonTypeExposureTree.cs index 2b6c482a..45c3847f 100644 --- a/Assets/UdonSharp/Editor/Editors/UdonTypeExposureTree.cs +++ b/Assets/UdonSharp/Editor/Editors/UdonTypeExposureTree.cs @@ -586,6 +586,9 @@ private void BuildExposedTypeList() foreach (FieldInfo field in type.GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)) { + if (field.DeclaringType?.FullName == null) // Fix szome weird types in Odin that don't have a name for their declaring type + continue; + if (resolver.IsValidUdonMethod(resolver.GetUdonFieldAccessorName(field, FieldAccessorType.Get, false))) { System.Type returnType = field.FieldType;