AssetDatabase
- AddObjectToAsset
- AssetPathToGUID
- ClearLabels
- CompleteLabel
- Contains
- CopyAsset
- CreateAsset
- CreateFolder
- DeleteAsset
- ExportPackage
- GenerateUniqueAssetPath
- GetAssetPath
- GetCachedIcon
- GetDependencies
- GetLabels
- GetTextMetaDataPathFromA...
- GUIDToAssetPath
- ImportAsset
- ImportPackage
- IsMainAsset
- LoadAllAssetRepresentations...
- LoadAllAssetsAtPath
- LoadAssetAtPath
- LoadMainAssetAtPath
- MoveAssetToTrash
- MoveAsset
- OpenAsset
- Refresh
- RenameAsset
- SaveAssets
- SetLabels
- StartAssetEditing
- StopAssetEditing
- ValidateMoveAsset
AssetDatabase.RenameAsset 重命名资源
static function RenameAsset (pathName : string, newName : string) : string
Parameters参数
-
pathNamethe path where the asset currently resides
资源当前所在的路径 -
newNamethe new name which should be given to the asset.
赋给资源的新名称
string - an empty string, if the asset has been successfully renamed, and an error string otherwise. All paths are relative to the project folder. Like: "Assets/MyTextures/hello.png"
返回String类型 - 如果资源成功重命名返回一个空的字符串,否者返回错误字符串。所有的路径都是相对于工程目录文件。例如” Assets/MyTextures/hello.png”。
Description描述
Rename an asset file.
重命名资源文件。
最后修改:2011年5月31日 Tuesday 14:10