public static string RenameAsset (string pathName, string newName);

Parameters

pathName资源当前所在的路径。
newName应为资源提供的新名称。

Returns

string 如果资源重命名成功,则返回一个空字符串;否则,返回一条错误消息。

Description

为资源文件重命名。

所有路径均是相对于项目文件夹的路径,例如:"Assets/MyTextures/hello.png"。