Struct MeshInstance2D

Node used for displaying a Mesh in 2D.

struct MeshInstance2D ;

Can be constructed from an existing Sprite via a tool in the editor toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D".

Properties

NameTypeDescription
mesh[get, set] MeshThe Mesh that will be drawn by the MeshInstance2D.
normalMap[get, set] TextureThe normal map that will be used if using the default CanvasItemMaterial.
texture[get, set] TextureThe Texture that will be used if using the default CanvasItemMaterial. Can be accessed as TEXTURE in CanvasItem shader.

Methods

NameDescription
getMesh
getNormalMap
getTexture
setMesh
setNormalMap
setTexture