template< class T > T* NewObject(UObject* Outer, FName Name, ...) { ... FStaticConstructObjectParameters Params(T::StaticClass()); Params.Outer = Outer; Params.Name = Name; ... return static_cast<T*>(StaticConstructObject_Internal(Params)); }
参考:https://zhuanlan.zhihu.com/p/357510279?utm_id=0
该方法用来创建UObject对象。它一共分为两步:1.FStaticConstructObjectParameters参数对象。2.StaticConstructObject_Internal对象。
>>NewObject能不能触发自定义的某些构造函数,便于构造的时候,初始化某些自定义的属性?
标签:...,Outer,Name,自定义,Params,NewObject,UE4,方法 From: https://www.cnblogs.com/2008nmj/p/17731862.html