Save object to a package or asset

Create a new package for the new asset:

  1. UPackage* NewPackage = CreatePackage(nullptr, NewPackageName);

  2. Than duplicate the existing asset so that its Outer is the NewPackage:

  3. UObject* NewObject = StaticDuplicateObject(OldObject, NewPackage);

  4. Than make any changes you want to NewObject and save the new package with:

  5. SavePackageHelper(NewPackage, NewPackageName);

Reference From

The Cook, The Resave, His Garbage And Her Optimization – Unreal ...

Reference From