It doesn’t need to be a UFUNCTION, you can (and should) just use CreateUObject in place of CreateRaw above.