Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
MeshInstance2D
Hérite de : Node2D < CanvasItem < Node < Object
Un nœud utilisé pour afficher des Mesh en 2D.
Description
Node used for displaying a Mesh in 2D. This can be faster to render compared to displaying a Sprite2D node with large transparent areas, especially if the node takes up a lot of space on screen at high viewport resolutions. This is because using a mesh designed to fit the sprite's opaque areas will reduce GPU fill rate utilization (at the cost of increased vertex processing utilization).
When a Mesh has to be instantiated more than thousands of times close to each other, consider using a MultiMesh in a MultiMeshInstance2D instead.
A MeshInstance2D can be created from an existing Sprite2D via a tool in the editor toolbar. Select the Sprite2D node, then choose Sprite2D > Convert to MeshInstance2D at the top of the 2D editor viewport.
Tutoriels
Propriétés
Signaux
texture_changed() 🔗
Émis quand la texture a changé.
Descriptions des propriétés
Le Mesh qui sera affiché par le MeshInstance2D.
La Texture2D qui sera utilisée si vous utilisez le CanvasItemMaterial par défaut. Peut être accédée via TEXTURE dans le shader du CanvasItem.