Unable to retrieve the old name of an asset after modifying the asset's name

I want to implement some functionality after renaming an asset. I need to retrieve the old asset name. I tried using AssetTools.OnAssetPostRename(), but it doesn’t provide the old asset name.

After inspecting the source code, I found that this delegate is not correctly initializing FAssetRenameData before broadcasting, causing both OldObjectPath and NewObjectPath to be empty, so I can only access information about the renamed asset.

Is there another method available?

I have found a way to implement my idea: using FEditorDelegates::OnPreDestructiveAssetAction to record the path of an asset before it is modified.

I hope this can help you if you need it.