Пример #1
0
        private IntPtr FindFirstNonUSharpClassParentClass(IntPtr unrealClass)
        {
            IntPtr sharpStaticClass = Native_USharpClass.StaticClass();

            while (unrealClass != IntPtr.Zero && !Native_UObjectBaseUtility.IsA(unrealClass, sharpStaticClass))
            {
                unrealClass = Native_UClass.GetSuperClass(unrealClass);
            }
            return(unrealClass);
        }
Пример #2
0
        private IntPtr FindFirstNativeParentClass(IntPtr unrealClass)
        {
            IntPtr sharpStaticClass = Native_USharpClass.StaticClass();

            while (unrealClass != IntPtr.Zero && (!Native_UClass.HasAnyClassFlags(unrealClass, EClassFlags.Native) ||
                                                  Native_UObjectBaseUtility.IsA(unrealClass, sharpStaticClass)))
            {
                unrealClass = Native_UClass.GetSuperClass(unrealClass);
            }
            return(unrealClass);
        }
Пример #3
0
        private void Constructor(IntPtr objectInitializerPtr)
        {
            Native_UClass.Call_ClassConstructor(ParentClass, objectInitializerPtr);
            FObjectInitializer objectInitializer = new FObjectInitializer(objectInitializerPtr);

            IntPtr sharpStaticClass = Native_USharpClass.StaticClass();
            IntPtr unrealClass      = Native_FObjectInitializer.GetClass(objectInitializerPtr);
            IntPtr sharpClass       = unrealClass;

            while (sharpClass != IntPtr.Zero && !Native_UObjectBaseUtility.IsA(sharpClass, sharpStaticClass))
            {
                sharpClass = Native_UClass.GetSuperClass(sharpClass);
            }

            System.Diagnostics.Debug.Assert(sharpClass != IntPtr.Zero);
        }