class_rid.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the RID.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_RID:
  5. RID
  6. ===
  7. **Category:** Built-In Types
  8. Brief Description
  9. -----------------
  10. Handle for a :ref:`Resource<class_Resource>`'s unique ID.
  11. Methods
  12. -------
  13. +-----------------------+-------------------------------------------------------------------------------+
  14. | :ref:`RID<class_RID>` | :ref:`RID<class_RID_method_RID>` **(** :ref:`Object<class_Object>` from **)** |
  15. +-----------------------+-------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_id<class_RID_method_get_id>` **(** **)** |
  17. +-----------------------+-------------------------------------------------------------------------------+
  18. Description
  19. -----------
  20. The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer<class_VisualServer>`.
  21. Method Descriptions
  22. -------------------
  23. .. _class_RID_method_RID:
  24. - :ref:`RID<class_RID>` **RID** **(** :ref:`Object<class_Object>` from **)**
  25. Creates a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0.
  26. .. _class_RID_method_get_id:
  27. - :ref:`int<class_int>` **get_id** **(** **)**
  28. Returns the ID of the referenced resource.