UAssets renamed from c++ are deleted when fixing up redirectors

Using the UObject method “Rename” from c++ on a UAsset results in data loss later on, as the entire .UAsset file is deleted from the disk when fixing up redirectors.

FString NewName = "TestName";
InObject->Rename(*NewName);

I am sure the process is more complex and requires some other method to properly and securely rename assets. How is this done?

1 Like

Bit too soon, I figured it out already.

AssetToolsModule.Get().RenameAssets(AssetRenameData)

Odd however that a UObject contains the method to be renamed if it leads to corruption.