public static bool IsAssignableFrom(this Type type, IDeclaredType c) { if (c == null) return false; return type.FullName == c.GetClrName().FullName || c.GetAllSuperTypes().Any(superType => type.FullName == superType.GetClrName().FullName); }
private static IDeclaredType GetUnityEventType(IDeclaredType eventType) { foreach (var superType in eventType.GetAllSuperTypes()) { if (superType.GetClrName().ShortName == "UnityEvent") { return(superType); } } return(null); }
internal static bool IsAssignableFrom(this Type type, IDeclaredType c) { return type.FullName == c.GetClrName().FullName || c.GetAllSuperTypes().Any(superType => type.FullName == superType.GetClrName().FullName); }
internal static bool IsAssignableFrom(this Type type, IDeclaredType c) { return(type.FullName == c.GetClrName().FullName || c.GetAllSuperTypes().Any(superType => type.FullName == superType.GetClrName().FullName)); }