diff --git a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs index dbf3205..bec2c47 100644 --- a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs +++ b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs @@ -13,6 +13,11 @@ namespace MackySoft.SerializeReferenceExtensions.Editor { } public static Type GetType (string typeName) { + if (string.IsNullOrEmpty(typeName)) + { + return null; + } + int splitIndex = typeName.IndexOf(' '); var assembly = Assembly.Load(typeName.Substring(0,splitIndex)); return assembly.GetType(typeName.Substring(splitIndex + 1));