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);
        }
Esempio n. 2
0
        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);
 }
Esempio n. 4
0
 internal static bool IsAssignableFrom(this Type type, IDeclaredType c)
 {
     return(type.FullName == c.GetClrName().FullName || c.GetAllSuperTypes().Any(superType => type.FullName == superType.GetClrName().FullName));
 }