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) }); }
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); }
//给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); }
//给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); }
public static T NewObject <T>(UClass Class) where T : UObject, new() { T t = new T() { _this = NewObject(Class) }; return(t); }
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 }); }
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); }
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);
public static string MakeUniqueObjectName(UObject Outer, UClass Class, string BaseName) { return(_MakeUniqueObjectName(Outer, Class, BaseName)); }
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)); }
////[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);
//{ // 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);
//{ // 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);
//{ // 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);
//{ // 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);