Skip to content

Commit

Permalink
Fix issue where exposure tree loops endlessly when Odin is imported
Browse files Browse the repository at this point in the history
- A type's FullName property is null on some Odin types, so skip them. Reported by Code-L
  • Loading branch information
MerlinVR committed Jan 14, 2021
1 parent 146565f commit b426932
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Assets/UdonSharp/Editor/Editors/UdonTypeExposureTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b426932

Please sign in to comment.