class_meshlibrary - dragonsoulz/godot GitHub Wiki

MeshLibrary

####Inherits: Resource ####Category: Core

Brief Description

Library of meshes.

Member Functions

Description

Library of meshes. Contains a list of Mesh resources, each with name and ID. Useful for GridMap or painting Terrain.

Member Function Description

create_item

  • void create_item ( int id )

Create a new item in the library, supplied an id.

set_item_name

Set the name of the item.

set_item_mesh

  • void set_item_mesh ( int id, Mesh mesh )

Set the mesh of the item.

get_item_name

Return the name of the item.

get_item_mesh

  • Mesh get_item_mesh ( int id ) const

Return the mesh of the item.

remove_item

  • void remove_item ( int id )

Remove the item.

clear

  • void clear ( )

Clear the library.

get_item_list

Return the list of items.

get_last_unused_item_id

  • int get_last_unused_item_id ( ) const

Get an unused id for a new item.