Example #1
0
 internal static IntPtr GetStaticClass(Type type)
 {
     if (IsManagedUnrealType(type))
     {
         ManagedUnrealClass baseClass = FindClass(type);
         if (baseClass != null)
         {
             return(baseClass.StaticClass);
         }
         baseClass = CreateClass(type);
         if (baseClass != null)
         {
             return(baseClass.StaticClass);
         }
     }
     else
     {
         UMetaPathAttribute pathAttribute = type.GetCustomAttribute <UMetaPathAttribute>();
         if (pathAttribute != null)
         {
             return(UClass.FindClassAddressByPath(pathAttribute.Path));
         }
     }
     return(IntPtr.Zero);
 }