github_url: | hide |
---|
Inherits: :ref:`Resource<class_Resource>` < :ref:`Reference<class_Reference>` < :ref:`Object<class_Object>`
Library of meshes.
A library of meshes. Contains a list of :ref:`Mesh<class_Mesh>` resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in :ref:`GridMap<class_GridMap>`.
Clears the library.
Creates a new item in the library with the given ID.
You can get an unused ID from :ref:`get_last_unused_item_id<class_MeshLibrary_method_get_last_unused_item_id>`.
Returns the first item with the given name.
Returns the list of item IDs in use.
Returns the item's mesh.
Returns the item's name.
Returns the item's navigation mesh.
Returns the transform applied to the item's navigation mesh.
When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using :ref:`set_item_preview<class_MeshLibrary_method_set_item_preview>`. Returns an empty :ref:`Texture2D<class_Texture2D>` if no preview was manually set in a running project.
Returns an item's collision shapes.
The array consists of each :ref:`Shape<class_Shape>` followed by its :ref:`Transform<class_Transform>`.
Gets an unused ID for a new item.
Removes the item.
Sets the item's mesh.
Sets the item's name.
This name is shown in the editor. It can also be used to look up the item later using :ref:`find_item_by_name<class_MeshLibrary_method_find_item_by_name>`.
Sets the item's navigation mesh.
Sets the transform to apply to the item's navigation mesh.
Sets a texture to use as the item's preview icon in the editor.
Sets an item's collision shapes.
The array should consist of :ref:`Shape<class_Shape>` objects, each followed by a :ref:`Transform<class_Transform>` that will be applied to it. For shapes that should not have a transform, use :ref:`Transform.IDENTITY<class_Transform_constant_IDENTITY>`.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。