RID
Resource 的唯一識別碼的控制碼。
說明
The RID Variant type is used to access a low-level resource by its unique ID. RIDs are opaque, which means they do not grant access to the resource by themselves. They are used by the low-level server classes, such as DisplayServer, RenderingServer, TextServer, etc.
A low-level resource may correspond to a high-level Resource, such as Texture or Mesh.
Note: RIDs are only useful during the current session. It won't correspond to a similar resource if sent over a network, or loaded from a file at a later time.
備註
使用 C# 操作此 API 時有顯著差異,詳見 C# API 與 GDScript 的不同。
建構子
RID() |
|
方法
get_id() const |
|
is_valid() const |
運算子
operator !=(right: RID) |
|
operator <(right: RID) |
|
operator <=(right: RID) |
|
operator ==(right: RID) |
|
operator >(right: RID) |
|
operator >=(right: RID) |
建構子說明
建構空的 RID,內容為無效的 ID 0。
Constructs an RID as a copy of the given RID.
方法說明
返回引用的底層資源的 ID。
如果該 RID 非 0,則返回 true。
運算子說明
bool operator !=(right: RID) 🔗
如果 RID 不相等,則返回 true。
如果該 RID 的 ID 小於右側 right 的 ID,則返回 true。
bool operator <=(right: RID) 🔗
如果該 RID 的 ID 小於等於右側 right 的 ID,則返回 true。
bool operator ==(right: RID) 🔗
如果 RID 相等,則返回 true,表示它們引用的是同一個底層資源。
如果該 RID 的 ID 大於右側 right 的 ID,則返回 true。
bool operator >=(right: RID) 🔗
如果該 RID 的 ID 大於等於右側 right 的 ID,則返回 true。