MeshLibrary

Inherits: Resource < Reference < Object

Category: Core

Brief Description

Library of meshes.

Methods

void clear ( )
void create_item ( int id )
int find_item_by_name ( String name ) const
PoolIntArray get_item_list ( ) const
Mesh get_item_mesh ( int id ) const
String get_item_name ( int id ) const
NavigationMesh get_item_navmesh ( int id ) const
Transform get_item_navmesh_transform ( int id ) const
Texture get_item_preview ( int id ) const
Array get_item_shapes ( int id ) const
int get_last_unused_item_id ( ) const
void remove_item ( int id )
void set_item_mesh ( int id, Mesh mesh )
void set_item_name ( int id, String name )
void set_item_navmesh ( int id, NavigationMesh navmesh )
void set_item_navmesh_transform ( int id, Transform navmesh )
void set_item_preview ( int id, Texture texture )
void set_item_shapes ( int id, Array shapes )

Description

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

Method Descriptions

  • void clear ( )

Clear the library.

  • void create_item ( int id )

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

  • int find_item_by_name ( String name ) const

Returns the list of items.

  • Mesh get_item_mesh ( int id ) const

Returns the mesh of the item.

Returns the name of the item.

  • Array get_item_shapes ( int id ) const
  • int get_last_unused_item_id ( ) const

Gets an unused id for a new item.

  • void remove_item ( int id )

Removes the item.

  • void set_item_mesh ( int id, Mesh mesh )

Sets the mesh of the item.

Sets the name of the item.

  • void set_item_navmesh_transform ( int id, Transform navmesh )
  • void set_item_preview ( int id, Texture texture )
  • void set_item_shapes ( int id, Array shapes )