:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/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`. \ **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. .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. .. rst-class:: classref-reftable-group Constructors ------------ .. table:: :widths: auto +-----------------------+---------------------------------------------------------------------------+ | :ref:`RID` | :ref:`RID`\ (\ ) | +-----------------------+---------------------------------------------------------------------------+ | :ref:`RID` | :ref:`RID`\ (\ from\: :ref:`RID`\ ) | +-----------------------+---------------------------------------------------------------------------+ .. 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 !=`\ (\ right\: :ref:`RID`\ ) | +-------------------------+--------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator \<`\ (\ right\: :ref:`RID`\ ) | +-------------------------+--------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator \<=`\ (\ right\: :ref:`RID`\ ) | +-------------------------+--------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`RID`\ ) | +-------------------------+--------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >`\ (\ right\: :ref:`RID`\ ) | +-------------------------+--------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >=`\ (\ right\: :ref:`RID`\ ) | +-------------------------+--------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_RID_constructor_RID: .. rst-class:: classref-constructor :ref:`RID` **RID**\ (\ ) :ref:`🔗` Constructs an empty **RID** with the invalid ID ``0``. .. rst-class:: classref-item-separator ---- .. rst-class:: classref-constructor :ref:`RID` **RID**\ (\ from\: :ref:`RID`\ ) 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| :ref:`🔗` 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| :ref:`🔗` 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 !=**\ (\ right\: :ref:`RID`\ ) :ref:`🔗` 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 <**\ (\ right\: :ref:`RID`\ ) :ref:`🔗` 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 <=**\ (\ right\: :ref:`RID`\ ) :ref:`🔗` 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 ==**\ (\ right\: :ref:`RID`\ ) :ref:`🔗` 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 >**\ (\ right\: :ref:`RID`\ ) :ref:`🔗` 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 >=**\ (\ right\: :ref:`RID`\ ) :ref:`🔗` 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.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`