:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/RID.xml. .. _class_RID: RID === A handle for a :ref:`Resource`'s unique identifier. .. rst-class:: classref-introduction-group Description ----------- The RID :ref:`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 :ref:`DisplayServer`, :ref:`RenderingServer`, :ref:`TextServer`, etc. A low-level resource may correspond to a high-level :ref:`Resource`, such as :ref:`Texture` or :ref:`Mesh`. .. rst-class:: classref-reftable-group Constructors ------------ .. table:: :widths: auto +-----------------------+------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`RID` **(** **)** | +-----------------------+------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`RID` **(** :ref:`RID` from **)** | +-----------------------+------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------+----------------------------------------------------------------+ | :ref:`int` | :ref:`get_id` **(** **)** |const| | +-------------------------+----------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid` **(** **)** |const| | +-------------------------+----------------------------------------------------------------+ .. rst-class:: classref-reftable-group Operators --------- .. table:: :widths: auto +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator \<` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator \<=` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >=` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_RID_constructor_RID: .. rst-class:: classref-constructor :ref:`RID` **RID** **(** **)** Constructs an empty **RID** with the invalid ID ``0``. .. rst-class:: classref-item-separator ---- .. rst-class:: classref-constructor :ref:`RID` **RID** **(** :ref:`RID` from **)** Constructs a **RID** as a copy of the given **RID**. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_RID_method_get_id: .. rst-class:: classref-method :ref:`int` **get_id** **(** **)** |const| Returns the ID of the referenced low-level resource. .. rst-class:: classref-item-separator ---- .. _class_RID_method_is_valid: .. rst-class:: classref-method :ref:`bool` **is_valid** **(** **)** |const| Returns ``true`` if the **RID** is not ``0``. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Operator Descriptions --------------------- .. _class_RID_operator_neq_RID: .. rst-class:: classref-operator :ref:`bool` **operator !=** **(** :ref:`RID` right **)** Returns ``true`` if the **RID**\ s are not equal. .. rst-class:: classref-item-separator ---- .. _class_RID_operator_lt_RID: .. rst-class:: classref-operator :ref:`bool` **operator <** **(** :ref:`RID` right **)** Returns ``true`` if the **RID**'s ID is less than ``right``'s ID. .. rst-class:: classref-item-separator ---- .. _class_RID_operator_lte_RID: .. rst-class:: classref-operator :ref:`bool` **operator <=** **(** :ref:`RID` right **)** Returns ``true`` if the **RID**'s ID is less than or equal to ``right``'s ID. .. rst-class:: classref-item-separator ---- .. _class_RID_operator_eq_RID: .. rst-class:: classref-operator :ref:`bool` **operator ==** **(** :ref:`RID` right **)** Returns ``true`` if both **RID**\ s are equal, which means they both refer to the same low-level resource. .. rst-class:: classref-item-separator ---- .. _class_RID_operator_gt_RID: .. rst-class:: classref-operator :ref:`bool` **operator >** **(** :ref:`RID` right **)** Returns ``true`` if the **RID**'s ID is greater than ``right``'s ID. .. rst-class:: classref-item-separator ---- .. _class_RID_operator_gte_RID: .. rst-class:: classref-operator :ref:`bool` **operator >=** **(** :ref:`RID` right **)** Returns ``true`` if the **RID**'s ID is greater than or equal to ``right``'s ID. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`