AssetDatabase.RenameAsset() inconsistency

Hi,

I’m working on a custom Editor script which creates and modifies scriptable objects.

I think there is some inconsistency in the various AssetDatabase functions
for example

AssetDatabase.CreateAsset() takes the filename as a full path (with filename)
AssetDatabase.GenerateUniqueAssetPath() takes filename as a full path (with filename)
AssetDatabase.DeleteAsset() takes filename as a full path (with filename)
etc…etc

but

AssetDatabase.RenameAsset() takes separate path and filename, which is quite inconvenient if you want to use GenerateUniqueAssetPath to see if the new name you want to give the asset exists.I’m not sure why for RenameAsset() path and filename are separate, why not just give it the fullpath like all the other functions ? or perhaps this could function could have both usecases.

kind regards, and keepup the great work

Robber

In case someone else runs into this, here is a fix:

using System.IO;

use Path.GetFileName() to separate the filename from the path.