报错: UObject() constructor called but it's not the object that's currently being constructed with NewObject. Maybe you are trying to construct it on the stack, which is not supported.
原因: UObject不能直接调用构造函数. 在声明时应该使用指针, 然后再用CreateDefaultSubobject来创建
DemoObject = CreateDefaultSubobject<UDemoObject>(TEXT("UDemoObject"));