123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the Object.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_Object:
- Object
- ======
- **Inherited By:** :ref:`Reference<class_reference>`, :ref:`Physics2DServer<class_physics2dserver>`, :ref:`MainLoop<class_mainloop>`, :ref:`Input<class_input>`, :ref:`Node<class_node>`, :ref:`Geometry<class_geometry>`, :ref:`ARVRPositionalTracker<class_arvrpositionaltracker>`, :ref:`TreeItem<class_treeitem>`, :ref:`PhysicsDirectBodyState<class_physicsdirectbodystate>`, :ref:`JavaScript<class_javascript>`, :ref:`ARVRServer<class_arvrserver>`, :ref:`PhysicsDirectSpaceState<class_physicsdirectspacestate>`, :ref:`Engine<class_engine>`, :ref:`Physics2DDirectSpaceState<class_physics2ddirectspacestate>`, :ref:`InputMap<class_inputmap>`, :ref:`UndoRedo<class_undoredo>`, :ref:`PhysicsServer<class_physicsserver>`, :ref:`ProjectSettings<class_projectsettings>`, :ref:`ResourceSaver<class_resourcesaver>`, :ref:`Performance<class_performance>`, :ref:`ResourceLoader<class_resourceloader>`, :ref:`JSON<class_json>`, :ref:`AudioServer<class_audioserver>`, :ref:`IP<class_ip>`, :ref:`ClassDB<class_classdb>`, :ref:`VisualServer<class_visualserver>`, :ref:`OS<class_os>`, :ref:`GodotSharp<class_godotsharp>`, :ref:`EditorSelection<class_editorselection>`, :ref:`Physics2DDirectBodyState<class_physics2ddirectbodystate>`, :ref:`VisualScriptEditor<class_visualscripteditor>`, :ref:`TranslationServer<class_translationserver>`, :ref:`EditorFileSystemDirectory<class_editorfilesystemdirectory>`
- **Category:** Core
- Brief Description
- -----------------
- Base class for all non built-in types.
- Member Functions
- ----------------
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_get<class_Object__get>` **(** :ref:`String<class_string>` property **)** virtual |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`_get_property_list<class_Object__get_property_list>` **(** **)** virtual |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_init<class_Object__init>` **(** **)** virtual |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_notification<class_Object__notification>` **(** :ref:`int<class_int>` what **)** virtual |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`_set<class_Object__set>` **(** :ref:`String<class_string>` property, :ref:`Variant<class_variant>` value **)** virtual |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_user_signal<class_Object_add_user_signal>` **(** :ref:`String<class_string>` signal, :ref:`Array<class_array>` arguments=[ ] **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_variant>` | :ref:`call<class_Object_call>` **(** :ref:`String<class_string>` method **)** vararg |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_variant>` | :ref:`call_deferred<class_Object_call_deferred>` **(** :ref:`String<class_string>` method **)** vararg |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_variant>` | :ref:`callv<class_Object_callv>` **(** :ref:`String<class_string>` method, :ref:`Array<class_array>` arg_array **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`can_translate_messages<class_Object_can_translate_messages>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`connect<class_Object_connect>` **(** :ref:`String<class_string>` signal, :ref:`Object<class_object>` target, :ref:`String<class_string>` method, :ref:`Array<class_array>` binds=[ ], :ref:`int<class_int>` flags=0 **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`disconnect<class_Object_disconnect>` **(** :ref:`String<class_string>` signal, :ref:`Object<class_object>` target, :ref:`String<class_string>` method **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_variant>` | :ref:`emit_signal<class_Object_emit_signal>` **(** :ref:`String<class_string>` signal **)** vararg |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`free<class_Object_free>` **(** **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_variant>` | :ref:`get<class_Object_get>` **(** :ref:`String<class_string>` property **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`get_class<class_Object_get_class>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_incoming_connections<class_Object_get_incoming_connections>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_variant>` | :ref:`get_indexed<class_Object_get_indexed>` **(** :ref:`NodePath<class_nodepath>` property **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_instance_id<class_Object_get_instance_id>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_variant>` | :ref:`get_meta<class_Object_get_meta>` **(** :ref:`String<class_string>` name **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_meta_list<class_Object_get_meta_list>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_method_list<class_Object_get_method_list>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_property_list<class_Object_get_property_list>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Reference<class_reference>` | :ref:`get_script<class_Object_get_script>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_signal_connection_list<class_Object_get_signal_connection_list>` **(** :ref:`String<class_string>` signal **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`get_signal_list<class_Object_get_signal_list>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_meta<class_Object_has_meta>` **(** :ref:`String<class_string>` name **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_method<class_Object_has_method>` **(** :ref:`String<class_string>` method **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_user_signal<class_Object_has_user_signal>` **(** :ref:`String<class_string>` signal **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_blocking_signals<class_Object_is_blocking_signals>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_class<class_Object_is_class>` **(** :ref:`String<class_string>` type **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_connected<class_Object_is_connected>` **(** :ref:`String<class_string>` signal, :ref:`Object<class_object>` target, :ref:`String<class_string>` method **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_queued_for_deletion<class_Object_is_queued_for_deletion>` **(** **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`notification<class_Object_notification>` **(** :ref:`int<class_int>` what, :ref:`bool<class_bool>` reversed=false **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`property_list_changed_notify<class_Object_property_list_changed_notify>` **(** **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set<class_Object_set>` **(** :ref:`String<class_string>` property, :ref:`Variant<class_variant>` value **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_block_signals<class_Object_set_block_signals>` **(** :ref:`bool<class_bool>` enable **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_indexed<class_Object_set_indexed>` **(** :ref:`NodePath<class_nodepath>` property, :ref:`Variant<class_variant>` value **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_message_translation<class_Object_set_message_translation>` **(** :ref:`bool<class_bool>` enable **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_meta<class_Object_set_meta>` **(** :ref:`String<class_string>` name, :ref:`Variant<class_variant>` value **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_script<class_Object_set_script>` **(** :ref:`Reference<class_reference>` script **)** |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`tr<class_Object_tr>` **(** :ref:`String<class_string>` message **)** const |
- +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Signals
- -------
- .. _class_Object_script_changed:
- - **script_changed** **(** **)**
- Emitted whenever the script of the Object is changed.
- Numeric Constants
- -----------------
- - **NOTIFICATION_POSTINITIALIZE** = **0** --- Called right when the object is initialized. Not available in script.
- - **NOTIFICATION_PREDELETE** = **1** --- Called before the object is about to be deleted.
- Enums
- -----
- .. _enum_Object_ConnectFlags:
- enum **ConnectFlags**
- - **CONNECT_DEFERRED** = **1** --- Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time.
- - **CONNECT_PERSIST** = **2** --- Persisting connections are saved when the object is serialized to file.
- - **CONNECT_ONESHOT** = **4** --- One shot connections disconnect themselves after emission.
- Description
- -----------
- Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class.
- Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the :ref:`free<class_Object_free>` function from the script or delete from C++).
- Some derivatives add memory management, such as :ref:`Reference<class_reference>` (which keeps a reference count and deletes itself automatically when no longer referenced) and :ref:`Node<class_node>`, which deletes the children tree when deleted.
- Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list<class_Object__get_property_list>` and handled in :ref:`_get<class_Object__get>` and :ref:`_set<class_Object__set>`. However, scripting languages and C++ have simpler means to export them.
- Objects also receive notifications (:ref:`_notification<class_Object__notification>`). Notifications are a simple way to notify the object about simple events, so they can all be handled together.
- Member Function Description
- ---------------------------
- .. _class_Object__get:
- - void **_get** **(** :ref:`String<class_string>` property **)** virtual
- Returns the given property. Returns ``null`` if the ``property`` does not exist.
- .. _class_Object__get_property_list:
- - :ref:`Array<class_array>` **_get_property_list** **(** **)** virtual
- Returns the object's property list as an :ref:`Array<class_array>` of dictionaries. Dictionaries must contain: name:String, type:int (see TYPE\_\* enum in :ref:`@GlobalScope<class_@globalscope>`) and optionally: hint:int (see PROPERTY_HINT\_\* in :ref:`@GlobalScope<class_@globalscope>`), hint_string:String, usage:int (see PROPERTY_USAGE\_\* in :ref:`@GlobalScope<class_@globalscope>`).
- .. _class_Object__init:
- - void **_init** **(** **)** virtual
- The virtual method called upon initialization.
- .. _class_Object__notification:
- - void **_notification** **(** :ref:`int<class_int>` what **)** virtual
- Notify the object internally using an ID.
- .. _class_Object__set:
- - :ref:`bool<class_bool>` **_set** **(** :ref:`String<class_string>` property, :ref:`Variant<class_variant>` value **)** virtual
- Sets a property. Returns ``true`` if the ``property`` exists.
- .. _class_Object_add_user_signal:
- - void **add_user_signal** **(** :ref:`String<class_string>` signal, :ref:`Array<class_array>` arguments=[ ] **)**
- Adds a user-defined ``signal``. Arguments are optional, but can be added as an :ref:`Array<class_array>` of dictionaries, each containing "name" and "type" (from :ref:`@GlobalScope<class_@globalscope>` TYPE\_\*).
- .. _class_Object_call:
- - :ref:`Variant<class_variant>` **call** **(** :ref:`String<class_string>` method **)** vararg
- Calls the ``method`` on the object and returns a result. Pass parameters as a comma separated list.
- .. _class_Object_call_deferred:
- - :ref:`Variant<class_variant>` **call_deferred** **(** :ref:`String<class_string>` method **)** vararg
- Calls the ``method`` on the object during idle time and returns a result. Pass parameters as a comma separated list.
- .. _class_Object_callv:
- - :ref:`Variant<class_variant>` **callv** **(** :ref:`String<class_string>` method, :ref:`Array<class_array>` arg_array **)**
- Calls the ``method`` on the object and returns a result. Pass parameters as an :ref:`Array<class_array>`.
- .. _class_Object_can_translate_messages:
- - :ref:`bool<class_bool>` **can_translate_messages** **(** **)** const
- Returns ``true`` if the object can translate strings.
- .. _class_Object_connect:
- - :ref:`int<class_int>` **connect** **(** :ref:`String<class_string>` signal, :ref:`Object<class_object>` target, :ref:`String<class_string>` method, :ref:`Array<class_array>` binds=[ ], :ref:`int<class_int>` flags=0 **)**
- Connects a ``signal`` to a ``method`` on a ``target`` object. Pass optional ``binds`` to the call. Use ``flags`` to set deferred or one shot connections. See ``CONNECT_*`` constants. A ``signal`` can only be connected once to a ``method``. It will throw an error if already connected. To avoid this, first use :ref:`is_connected<class_Object_is_connected>` to check for existing connections.
- .. _class_Object_disconnect:
- - void **disconnect** **(** :ref:`String<class_string>` signal, :ref:`Object<class_object>` target, :ref:`String<class_string>` method **)**
- Disconnects a ``signal`` from a ``method`` on the given ``target``.
- .. _class_Object_emit_signal:
- - :ref:`Variant<class_variant>` **emit_signal** **(** :ref:`String<class_string>` signal **)** vararg
- Emits the given ``signal``.
- .. _class_Object_free:
- - void **free** **(** **)**
- Deletes the object from memory.
- .. _class_Object_get:
- - :ref:`Variant<class_variant>` **get** **(** :ref:`String<class_string>` property **)** const
- Returns a :ref:`Variant<class_variant>` for a ``property``.
- .. _class_Object_get_class:
- - :ref:`String<class_string>` **get_class** **(** **)** const
- Returns the object's class as a :ref:`String<class_string>`.
- .. _class_Object_get_incoming_connections:
- - :ref:`Array<class_array>` **get_incoming_connections** **(** **)** const
- Returns an :ref:`Array<class_array>` of dictionaries with information about signals that are connected to the object.
- Inside each :ref:`Dictionary<class_dictionary>` there are 3 fields:
- - "source" is a reference to signal emitter.
- - "signal_name" is name of connected signal.
- - "method_name" is a name of method to which signal is connected.
- .. _class_Object_get_indexed:
- - :ref:`Variant<class_variant>` **get_indexed** **(** :ref:`NodePath<class_nodepath>` property **)** const
- .. _class_Object_get_instance_id:
- - :ref:`int<class_int>` **get_instance_id** **(** **)** const
- Returns the object's unique instance ID.
- .. _class_Object_get_meta:
- - :ref:`Variant<class_variant>` **get_meta** **(** :ref:`String<class_string>` name **)** const
- Returns the object's metadata for the given ``name``.
- .. _class_Object_get_meta_list:
- - :ref:`PoolStringArray<class_poolstringarray>` **get_meta_list** **(** **)** const
- Returns the object's metadata as a :ref:`PoolStringArray<class_poolstringarray>`.
- .. _class_Object_get_method_list:
- - :ref:`Array<class_array>` **get_method_list** **(** **)** const
- Returns the object's methods and their signatures as an :ref:`Array<class_array>`.
- .. _class_Object_get_property_list:
- - :ref:`Array<class_array>` **get_property_list** **(** **)** const
- Returns the list of properties as an :ref:`Array<class_array>` of dictionaries. Dictionaries contain: name:String, type:int (see TYPE\_\* enum in :ref:`@GlobalScope<class_@globalscope>`) and optionally: hint:int (see PROPERTY_HINT\_\* in :ref:`@GlobalScope<class_@globalscope>`), hint_string:String, usage:int (see PROPERTY_USAGE\_\* in :ref:`@GlobalScope<class_@globalscope>`).
- .. _class_Object_get_script:
- - :ref:`Reference<class_reference>` **get_script** **(** **)** const
- Returns the object's :ref:`Script<class_script>` or ``null`` if one doesn't exist.
- .. _class_Object_get_signal_connection_list:
- - :ref:`Array<class_array>` **get_signal_connection_list** **(** :ref:`String<class_string>` signal **)** const
- Returns an :ref:`Array<class_array>` of connections for the given ``signal``.
- .. _class_Object_get_signal_list:
- - :ref:`Array<class_array>` **get_signal_list** **(** **)** const
- Returns the list of signals as an :ref:`Array<class_array>` of dictionaries.
- .. _class_Object_has_meta:
- - :ref:`bool<class_bool>` **has_meta** **(** :ref:`String<class_string>` name **)** const
- Returns ``true`` if a metadata is found with the given ``name``.
- .. _class_Object_has_method:
- - :ref:`bool<class_bool>` **has_method** **(** :ref:`String<class_string>` method **)** const
- Returns ``true`` if the object contains the given ``method``.
- .. _class_Object_has_user_signal:
- - :ref:`bool<class_bool>` **has_user_signal** **(** :ref:`String<class_string>` signal **)** const
- Returns ``true`` if the given user-defined ``signal`` exists.
- .. _class_Object_is_blocking_signals:
- - :ref:`bool<class_bool>` **is_blocking_signals** **(** **)** const
- Returns ``true`` if signal emission blocking is enabled.
- .. _class_Object_is_class:
- - :ref:`bool<class_bool>` **is_class** **(** :ref:`String<class_string>` type **)** const
- Returns ``true`` if the object inherits from the given ``type``.
- .. _class_Object_is_connected:
- - :ref:`bool<class_bool>` **is_connected** **(** :ref:`String<class_string>` signal, :ref:`Object<class_object>` target, :ref:`String<class_string>` method **)** const
- Returns ``true`` if a connection exists for a given ``signal``, ``target``, and ``method``.
- .. _class_Object_is_queued_for_deletion:
- - :ref:`bool<class_bool>` **is_queued_for_deletion** **(** **)** const
- Returns ``true`` if the ``queue_free`` method was called for the object.
- .. _class_Object_notification:
- - void **notification** **(** :ref:`int<class_int>` what, :ref:`bool<class_bool>` reversed=false **)**
- Notify the object of something.
- .. _class_Object_property_list_changed_notify:
- - void **property_list_changed_notify** **(** **)**
- .. _class_Object_set:
- - void **set** **(** :ref:`String<class_string>` property, :ref:`Variant<class_variant>` value **)**
- Set property into the object.
- .. _class_Object_set_block_signals:
- - void **set_block_signals** **(** :ref:`bool<class_bool>` enable **)**
- If set to true, signal emission is blocked.
- .. _class_Object_set_indexed:
- - void **set_indexed** **(** :ref:`NodePath<class_nodepath>` property, :ref:`Variant<class_variant>` value **)**
- .. _class_Object_set_message_translation:
- - void **set_message_translation** **(** :ref:`bool<class_bool>` enable **)**
- Define whether the object can translate strings (with calls to :ref:`tr<class_Object_tr>`). Default is true.
- .. _class_Object_set_meta:
- - void **set_meta** **(** :ref:`String<class_string>` name, :ref:`Variant<class_variant>` value **)**
- Set a metadata into the object. Metadata is serialized. Metadata can be *anything*.
- .. _class_Object_set_script:
- - void **set_script** **(** :ref:`Reference<class_reference>` script **)**
- Set a script into the object, scripts extend the object functionality.
- .. _class_Object_tr:
- - :ref:`String<class_string>` **tr** **(** :ref:`String<class_string>` message **)** const
- Translate a message. Only works if message translation is enabled (which it is by default). See :ref:`set_message_translation<class_Object_set_message_translation>`.
|