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.

MeshTexture

繼承: Texture2D < Texture < Resource < RefCounted < Object

簡單的紋理,使用一個網格來繪製自己。

說明

簡單的紋理,使用一個網格來繪製自己。它的套用場景有限,因為 Flag 不能更改,而且不支援區域繪製。

屬性

Texture2D

base_texture

Vector2

image_size

Vector2(0, 0)

Mesh

mesh

bool

resource_local_to_scene

false (overrides Resource)


屬性說明

Texture2D base_texture 🔗

設定該 Mesh 用來繪製的基礎紋理。


Vector2 image_size = Vector2(0, 0) 🔗

設定圖像的大小,需要參考。


Mesh mesh 🔗

  • void set_mesh(value: Mesh)

  • Mesh get_mesh()

設定用於繪製的網格,該網格必須使用 2D 頂點。