Simple std::unique_ptr issue

Unreal has its own Smart Pointer Library.
https://docs.unrealengine.com/en-US/…PointerLibrary

However you should never use smart pointer on UObjects, since they are memory managed by the engine through its GC.
For the same reason, you should never use the keyword “new” when you try to create an UObject instance, use the NewObject<T> function instead.

Also do not use the std library. UE4 C++ API has everything you could need, seriously.

I suggest you to read some UE4 C++ tutorial, since UE4 C++ is kinda different than “vanilla” C++.