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...
PlaceholderTexture2D
繼承: Texture2D < Texture < Resource < RefCounted < Object
二維紋理的占位類。
說明
載入使用 Texture2D 子類別的專案時,使用這個類的情況有兩種:
運作使用專用伺服器模式匯出的專案,僅保留紋理的尺寸(因為遊戲邏輯可能依賴紋理的尺寸,可能用來定位其他元素)。這樣能夠顯著減小匯出的 PCK 的大小。
由於引擎版本或建構不同而缺失這個子類別(例如禁用了某些模組)。
注意:設計這個類的目的並不是作為算繪的實際紋理。不保證能夠在著色器和材質中正常工作(例如對 UV 進行計算)。
屬性
resource_local_to_scene |
|
|
|
屬性說明
Vector2 size = Vector2(1, 1) 🔗
紋理的尺寸(單位為圖元)。