Skip to content

Commit

Permalink
Ignore UnityEngine classes from TypeAnalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
pnarimani authored and Mathijs-Bakker committed Jul 27, 2022
1 parent 4a05ef1 commit 8495d61
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,12 @@ static InjectTypeInfo GetInfoInternal(Type type)
public static bool ShouldSkipTypeAnalysis(Type type)
{
return type == null || type.IsEnum() || type.IsArray || type.IsInterface()
|| type.ContainsGenericParameters() || IsStaticType(type)
|| type == typeof(object);
|| type.ContainsGenericParameters() || IsStaticType(type)
|| type == typeof(object)
#if !NOT_UNITY3D
|| (type.Namespace != null && type.Namespace.Contains("UnityEngine"))
#endif
;
}

static bool IsStaticType(Type type)
Expand Down

0 comments on commit 8495d61

Please sign in to comment.