An Interface for accessing assets and performing operations on assets.
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
注意:这是一个编辑器类,如果想使用它你需要把它放到工程目录下的Assets/Editor文件夹下。编辑器类在UnityEditor命名空间下。所以当使用C#脚本时,你需要在脚本前面加上 "using UnityEditor"引用。
-
Is object an asset? // 资源中是否存在该对象?
-
Create a new folder. // 创建一个新的文件夹。
-
Is asset a main asset in the project window?
该资源在Project窗口中是不是主资源?
-
Creates a new unique path for an asset.
给一个资源创建一个新的唯一路径。
-
Begin Asset importing. This lets you group several asset imports together into one larger import.
开始资源导入。它可以让你把多个资源导入组合成一个更大的导入。
-
Stop Asset importing. This lets you group several asset imports together into one larger import.
停止资源导入。这可以让你把多个资源导入组合成一个更大的导入。
-
Checks if an asset file can be moved from one folder to another. (Without actually moving the file)
检查一个资源文件是否可以从一个文件夹移动到另外一个。(并不是真的移动这个文件)
-
Move an asset file from one folder to another.
将一个资源文件从一个文件夹移动到另外一个文件夹。
-
Rename an asset file. // 重命名资源文件。
-
Moves the asset at path to the trash.
将指定路径的资源移动到回收站。
-
Deletes the asset file at path.
删除指定路径的资源文件。
-
Import asset at path.
导入指定路径的资源。
-
Duplicates the asset at path and stores it at newPath
复制指定路径的资源文件到一个新的路径。
-
Creates a new asset at path.
在指定的路径新建资源。
-
Adds objectToAdd to an existing asset at path.
将objectToAdd这个对象添加到指定路径上的现有资源。
-
Returns the path name relative to the project folder where the asset is stored
返回相对于工程资源位置的路径名。
-
Gets the path to the text .meta file associasted with an asset
获取资源有关文本.meta文件的路径。
-
Returns the first asset object of type type at given path assetPath.
返回在指定位置assetPath下第一个类型是type的资源对象。
-
Returns the main asset object at assetPath.
返回指定路径assetPath下的主资源。
-
Returns all asset representations at assetPath.
返回assetPath所在路径的所有资源说明。
-
Returns an array of all asset objects at assetPath.
返回指定路径assetPath下的所有资源对象数组。
-
Import any changed assets.
重新导入有更新的资源。
-
Opens the asset with associated application.
用关联的程序打开资源文件。
-
Get the GUID for the asset at path
返回指定路径path下资源的GUID(全局唯一标识符)。
-
Translate a GUID to its current asset path
将GUID(全局唯一标识符)转换为对应的资源路径。
-
Writes all unsaved asset changes to disk.
将所有未保存的资源更改写入磁盘。
-
Retrieves an icon for the asset at the given asset path.
为指定路径的资源检索一个图标。
-
Returns all labels that match the given prefix.
返回符合给定前缀的所有标签。
-
Replaces that list of labels on an asset.
替换资源的标签列表。
-
Returns all labels attached to a given asset.
返回给定资源拥有的所有标签。
-
Removes all labels attached to an asset.
移除资源上所有的标签。
-
Given an asset pathName, returns the list of all assets it depends on.
已知资源pathName,返回与它有依赖关系的所有资源列表。
-
Exports the assets identified by assetPathNames to a unitypackage file in fileName.
导出assetPahtNames定义的资源到一个unitypackage里,并命名filename。
-
Imports package at packagePath into the current project.
将packagePath下的资源包导入到当前工程。