Save object to a package or asset
Create a new package for the new asset:
-
UPackage* NewPackage = CreatePackage(nullptr, NewPackageName);
-
Than duplicate the existing asset so that its Outer is the NewPackage:
-
UObject* NewObject = StaticDuplicateObject(OldObject, NewPackage);
-
Than make any changes you want to NewObject and save the new package with:
-
SavePackageHelper(NewPackage, NewPackageName);
Reference From https://udn.unrealengine.com/questions/366402/how-can-i-write-fassetdata-to-the-hard-disk.html
The Cook, The Resave, His Garbage And Her Optimization – Unreal ...