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...
MultiMeshInstance2D
继承: Node2D < CanvasItem < Node < Object
在 2D 中实例化 MultiMesh 的节点。
描述
MultiMeshInstance2D 是一个专门用于在 2D 中实例化 MultiMesh 资源的节点。与显示许多带有大面积透明区域的 Sprite2D 节点相比,这种方法渲染速度更快,尤其是在视口分辨率较高且节点占据屏幕较大空间的情况下。这是因为使用专为适合精灵不透明区域而设计的网格可以降低 GPU 填充率(但会增加顶点处理的开销)。
其用法与 MultiMeshInstance3D 相同。
属性
信号
texture_changed() 🔗
当 texture 被改变时触发。
属性说明
将由 MultiMeshInstance2D 绘制的 MultiMesh。
使用默认 CanvasItemMaterial 时,将使用的 Texture2D。可以在 CanvasItem 着色器中作为 TEXTURE 访问。