Exemple #1
0
 public static UObject StaticFindObjectFast(UClass Class, UObject InOuter, string InName, bool ExactClass = false, bool AnyPackage = false)
 {
     return(new UObject()
     {
         _this = _StaticFindObjectFast(Class, InOuter, InName, ExactClass, AnyPackage)
     });
 }
Exemple #2
0
        public AActor SpawnActor(UClass Class, FVector Location, FRotator Rotation)
        {
            AActor retValue = new AActor();

            retValue._this = SpawnActor(_this.Get(), Class._this.Get(), ref Location, ref Rotation);
            return(retValue);
        }
Exemple #3
0
        //给IntPtr创建合适的UObject对象
        public static T WrapObject <T>(IntPtr ObjPtr) where T : UObject, new()
        {
            UClass classObj = _GetClass(ObjPtr);
            T      t        = System.Activator.CreateInstance(Type.GetType(classObj.GetClassNameCpp())) as T;

            t._this = ObjPtr;
            return(t);
        }
Exemple #4
0
        //给IntPtr创建合适的UObject对象
        internal static T WrapObject <T>(IntPtr ObjPtr) where T : UObject, new()
        {
            UClass classObj = _GetClass(ObjPtr);
            //TODO: works only for this assembly. however this might be the only scope which needs to be considered for this function
            T t = System.Activator.CreateInstance(Type.GetType(classObj.GetClassNameCpp())) as T;

            t._this = ObjPtr;
            return(t);
        }
Exemple #5
0
        public static T NewObject <T>(UClass Class) where T : UObject, new()
        {
            T t = new T()
            {
                _this = NewObject(Class)
            };

            return(t);
        }
Exemple #6
0
        public static UObject StaticFindObject(UClass Class, UObject InOuter, string InName, bool ExactClass = false)
        {
            IntPtr r = _StaticFindObject(Class, InOuter, InName, ExactClass);

            if (r == IntPtr.Zero)
            {
                return(null);
            }
            return(new UObject()
            {
                _this = r
            });
        }
Exemple #7
0
        public static UClass StaticLoadClass(UClass BaseClass, UObject InOuter, string Name, string Filename = null, uint LoadFlags = 0, UPackageMap Sandbox = null)
        {
            IntPtr r = _StaticLoadClass(BaseClass, InOuter, Name, Filename, LoadFlags, Sandbox);

            if (r == IntPtr.Zero)
            {
                return(null);
            }
            return(new UClass()
            {
                _this = r
            });
        }
 public void SetAnimInstanceClass(UClass NewClass)
 {
     CheckIsValid();
     SetAnimInstanceClass(_this.Get(), NewClass);
 }
Exemple #9
0
 public extern void SetAnimInstanceClass(UClass NewClass);
 /// <summary>Return true if the class is usable : non-null and not pending kill</summary>
 public extern static bool IsValidClass(UClass Class);
 /// <summary>Returns the display name of a class</summary>
 public extern static FString GetClassDisplayName(UClass Class);
Exemple #12
0
 public static string MakeUniqueObjectName(UObject Outer, UClass Class, string BaseName)
 {
     return(_MakeUniqueObjectName(Outer, Class, BaseName));
 }
Exemple #13
0
 public static UObject StaticLoadObject(UClass Class, UObject InOuter, string Name, string Filename = null, uint LoadFlags = 0, UPackageMap Sandbox = null, bool bAllowObjectReconciliation = true)
 {
     return(_StaticLoadObject(Class, InOuter, Name, Filename, LoadFlags, Sandbox, bAllowObjectReconciliation));
 }
Exemple #14
0
        ////[MethodImplAttribute(MethodImplOptions.InternalCall)]
        //static extern IntPtr SpawnActor(IntPtr _this,IntPtr Class,ref FVector Location,ref FRotator Rotation);

        public extern AActor SpawnActor(UClass Class, FVector Location, FRotator Rotation);
Exemple #15
0
        //{
        //    return new UObject() { _this = _StaticFindObjectFast(Class, InOuter, InName, ExactClass, AnyPackage) };
        //}

        ////[MethodImplAttribute(MethodImplOptions.InternalCall)]
        //extern static IntPtr _StaticFindObject(IntPtr Class, IntPtr InOuter, string InName, bool ExactClass = false);

        public extern static UObject StaticFindObject(UClass Class, UObject InOuter, string InName, bool ExactClass = false);
Exemple #16
0
        //{
        //    IntPtr r = _StaticFindObject(Class, InOuter, InName, ExactClass);
        //    if (r == IntPtr.Zero)
        //        return null;
        //    return new UObject()
        //    {
        //        _this = r
        //    };
        //}

        ////[MethodImplAttribute(MethodImplOptions.InternalCall)]
        //extern static IntPtr _StaticLoadObject(IntPtr Class, IntPtr InOuter, string Name, string Filename, uint LoadFlags, IntPtr Sandbox, bool bAllowObjectReconciliation);

        public extern static UObject StaticLoadObject(UClass Class, UObject InOuter, string Name, string Filename = null, uint LoadFlags = 0, UPackageMap Sandbox = null, bool bAllowObjectReconciliation = true);
Exemple #17
0
        //{
        //    return StaticLoadClass(TypeClass<T>(), InOuter, Name, Filename, LoadFlags, Sandbox);
        //}

        ////[MethodImplAttribute(MethodImplOptions.InternalCall)]
        //extern static string _MakeUniqueObjectName(IntPtr Outer, IntPtr Class, string BaseName);

        public extern static string MakeUniqueObjectName(UObject Outer, UClass Class, string BaseName);
Exemple #18
0
        //{
        //    return _StaticLoadObject(Class, InOuter, Name, Filename, LoadFlags, Sandbox , bAllowObjectReconciliation);
        //}
        ////[MethodImplAttribute(MethodImplOptions.InternalCall)]
        //extern static IntPtr _StaticLoadClass(IntPtr BaseClass, IntPtr InOuter, string Name, string Filename, uint LoadFlags, IntPtr Sandbox);

        public extern static UClass StaticLoadClass(UClass BaseClass, UObject InOuter, string Name, string Filename = null, uint LoadFlags = 0, UPackageMap Sandbox = null);