Version: 2017.3
Experimental: this API is experimental and might be changed or removed in the future.

AssetImportContext.AddObjectToAsset

Cambiar al Manual
public void AddObjectToAsset (string identifier, Object obj);
public void AddObjectToAsset (string identifier, Object obj, Texture2D thumbnail);

Parámetros

identifier A unique identifier associated to this object.
obj The Unity Object to add to the asset.
thumbnail An optional 2D texture to use as the tumbnail for this object.

Descripción

Adds an object to the result of the import operation.

Use this method to add objects to the resulting asset. AddObjectToAsset can be called multiple times if more than one unity object is the result of the import process. Note: You must make sure that your importer provides a unique identifier for each added object. You must also make sure that your code regenerates the same identifier each time the file is re-imported: indentifiers should be deterministic. This allows Unity to keep match previously imported objects with the newly created objects. The identifier only needs to be unique within the context of the Asset file and not globaly unique across your whole project.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961