Hello everyone,
I’ve been working on a project on and off for a while and last I had time was in 4.9.2. I recently got back into it and decided that upgrading my project to 4.14 would be worthwhile with the recent changes. I had a programmer assist me for quite some time, but sadly we have lost contact since then, and some of his code has become deprecated.
Now, for my question, I’ve been trying to understand his implementations so far, and while I have rudimentary knowledge of C++, I’m currently stuck on this piece of code.
#include "Crystal_Defense.h"
#include "CreateNewObject.h"
UCreateNewObject::UCreateNewObject(const class FObjectInitializer& PCIP)
: Super(PCIP)
{
}
UObject* UCreateNewObject::NewObjectFromBlueprint(UObject* WorldContextObject, TSubclassOf<UObject> UC)
{
UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject);
UObject* tempObject = StaticConstructObject(UC);
return tempObject;
}
Specifically the StaticConstructObject having become deprecated, and the engine wanting me to use NewObject instead. I would be very grateful if someone could take their time to walk me through the steps necessary for this project to compile, as I’ve exhausted my google-fu in this matter.
Cheers.