//给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); }