class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCountedResource MeshLibrary
Library of meshes.

A library of meshes. Contains a list of Mesh resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in GridMap.

void clear<>():void

Clears the library.

void create_item<>( int id=, id:int=, ):void

Creates a new item in the library with the given ID.

You can get an unused ID from get_last_unused_item_id.

int find_item_by_name<>( String name=, name:String=, ):int

Returns the first item with the given name.

PackedInt32Array get_item_list<>():PackedInt32Array

Returns the list of item IDs in use.

Mesh get_item_mesh<>( int id=, id:int=, ):Mesh

Returns the item's mesh.

Transform3D get_item_mesh_transform<>( int id=, id:int=, ):Transform3D

Returns the transform applied to the item's mesh.

String get_item_name<>( int id=, id:int=, ):String

Returns the item's name.

int get_item_navigation_layers<>( int id=, id:int=, ):int

Returns the item's navigation layers bitmask.

NavigationMesh get_item_navigation_mesh<>( int id=, id:int=, ):NavigationMesh

Returns the item's navigation mesh.

Transform3D get_item_navigation_mesh_transform<>( int id=, id:int=, ):Transform3D

Returns the transform applied to the item's navigation mesh.

Texture2D get_item_preview<>( int id=, id:int=, ):Texture2D

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 set_item_preview. Returns an empty Texture2D if no preview was manually set in a running project.

Array get_item_shapes<>( int id=, id:int=, ):Array

Returns an item's collision shapes.

The array consists of each Shape3D followed by its Transform3D.

int get_last_unused_item_id<>():int

Gets an unused ID for a new item.

void remove_item<>( int id=, id:int=, ):void

Removes the item.

void set_item_mesh<>( int id=, id:int=, Mesh mesh=, mesh:Mesh=, ):void

Sets the item's mesh.

void set_item_mesh_transform<>( int id=, id:int=, Transform3D mesh_transform=, mesh_transform:Transform3D=, ):void

Sets the transform to apply to the item's mesh.

void set_item_name<>( int id=, id:int=, String name=, name:String=, ):void

Sets the item's name.

This name is shown in the editor. It can also be used to look up the item later using find_item_by_name.

void set_item_navigation_layers<>( int id=, id:int=, int navigation_layers=, navigation_layers:int=, ):void

Sets the item's navigation layers bitmask.

void set_item_navigation_mesh<>( int id=, id:int=, NavigationMesh navigation_mesh=, navigation_mesh:NavigationMesh=, ):void

Sets the item's navigation mesh.

void set_item_navigation_mesh_transform<>( int id=, id:int=, Transform3D navigation_mesh=, navigation_mesh:Transform3D=, ):void

Sets the transform to apply to the item's navigation mesh.

void set_item_preview<>( int id=, id:int=, Texture2D texture=, texture:Texture2D=, ):void

Sets a texture to use as the item's preview icon in the editor.

void set_item_shapes<>( int id=, id:int=, Array shapes=, shapes:Array=, ):void

Sets an item's collision shapes.

The array should consist of Shape3D objects, each followed by a Transform3D that will be applied to it. For shapes that should not have a transform, use Transform3D.IDENTITY.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...