class_rid.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/RID.xml.
  6. .. _class_RID:
  7. RID
  8. ===
  9. Handle for a :ref:`Resource<class_Resource>`'s unique ID.
  10. .. rst-class:: classref-introduction-group
  11. Description
  12. -----------
  13. The RID type is used to access the unique integer ID of a resource. They are opaque, which means 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>`.
  14. .. rst-class:: classref-reftable-group
  15. Methods
  16. -------
  17. .. table::
  18. :widths: auto
  19. +-----------------------+-------------------------------------------------------------------------------+
  20. | :ref:`RID<class_RID>` | :ref:`RID<class_RID_method_RID>` **(** :ref:`Object<class_Object>` from **)** |
  21. +-----------------------+-------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_id<class_RID_method_get_id>` **(** **)** |
  23. +-----------------------+-------------------------------------------------------------------------------+
  24. .. rst-class:: classref-section-separator
  25. ----
  26. .. rst-class:: classref-descriptions-group
  27. Method Descriptions
  28. -------------------
  29. .. _class_RID_method_RID:
  30. .. rst-class:: classref-method
  31. :ref:`RID<class_RID>` **RID** **(** :ref:`Object<class_Object>` from **)**
  32. Creates a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0.
  33. .. rst-class:: classref-item-separator
  34. ----
  35. .. _class_RID_method_get_id:
  36. .. rst-class:: classref-method
  37. :ref:`int<class_int>` **get_id** **(** **)**
  38. Returns the ID of the referenced resource.
  39. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  40. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  41. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  42. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`