Version: 2017.1
public static bool DeleteAsset (string path);

参数

path 要删除的资源的文件系统路径。

描述

删除路径下的资源文件。

Returns true if the asset has been successfully deleted, false if it doesn't exit or couldn't be removed.

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

另请参阅:AssetDatabase.MoveAssetToTrash。