AssetDatabase.DeleteAsset 删除资源

static function DeleteAsset (path : string) : bool

Description描述

Deletes the asset file at path.

删除指定路径的资源文件。

Returns true if the asset has been successfully deleted, false if it doesn't exit or couldn't be removed. All paths are relative to the project folder. Like: "Assets/MyTextures/hello.png" See Also: AssetDatabase.MoveAssetToTrash

如果资源已经被成功删除返回true,如果资源文件不存在或者不能成功移动到回收站返回false。所有的路径都是相对于工程目录文件。例如” Assets/MyTextures/hello.png”。

参见:AssetDatabase.MoveAssetToTrash

Page last updated: 2011-5-31