Library of meshes.
    public class MeshLibrary : Resource

A library of meshes. Contains a list of Mesh resources, each with a name and ID. This resource is used in GridMap.

Inheritance Chain


    public MeshLibrary()


    public void Clear()

Clears the library.

    public void CreateItem(int id)

Create a new item in the library, supplied as an ID.

    public int FindItemByName(string name)

    public int[] GetItemList()

Returns the list of items.

    public Mesh GetItemMesh(int id)

Returns the mesh of the item.

    public string GetItemName(int id)

Returns the name of the item.

    public NavigationMesh GetItemNavmesh(int id)

    public Transform GetItemNavmeshTransform(int id)

    public Texture GetItemPreview(int id)

Returns a generated item preview (a 3D rendering in isometric perspective).

Note: Since item previews are only generated in an editor context, this function will return an empty Texture in a running project.

    public Godot.Collections.Array GetItemShapes(int id)

    public int GetLastUnusedItemId()

Gets an unused ID for a new item.

    public void RemoveItem(int id)

Removes the item.

    public void SetItemMesh(int id, Mesh mesh)

Sets the item’s mesh.

    public void SetItemName(int id, string name)

Sets the item’s name.

    public void SetItemNavmesh(int id, NavigationMesh navmesh)

    public void SetItemNavmeshTransform(int id, Transform navmesh)

    public void SetItemPreview(int id, Texture texture)

    public void SetItemShapes(int id, Godot.Collections.Array shapes)