1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680 |
- :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/Node.xml.
- .. _class_Node:
- Node
- ====
- **Inherits:** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`AnimationMixer<class_AnimationMixer>`, :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, :ref:`CanvasItem<class_CanvasItem>`, :ref:`CanvasLayer<class_CanvasLayer>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorPlugin<class_EditorPlugin>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`HTTPRequest<class_HTTPRequest>`, :ref:`InstancePlaceholder<class_InstancePlaceholder>`, :ref:`MissingNode<class_MissingNode>`, :ref:`MultiplayerSpawner<class_MultiplayerSpawner>`, :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`, :ref:`NavigationAgent2D<class_NavigationAgent2D>`, :ref:`NavigationAgent3D<class_NavigationAgent3D>`, :ref:`Node3D<class_Node3D>`, :ref:`ResourcePreloader<class_ResourcePreloader>`, :ref:`ShaderGlobalsOverride<class_ShaderGlobalsOverride>`, :ref:`SkeletonIK3D<class_SkeletonIK3D>`, :ref:`Timer<class_Timer>`, :ref:`Viewport<class_Viewport>`, :ref:`WorldEnvironment<class_WorldEnvironment>`
- Base class for all scene objects.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names.
- A tree of nodes is called a *scene*. Scenes can be saved to the disk and then instantiated into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects.
- \ **Scene tree:** The :ref:`SceneTree<class_SceneTree>` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification and its :ref:`_enter_tree<class_Node_private_method__enter_tree>` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree<class_Node_private_method__enter_tree>` callback of a parent node will be triggered before its child's.
- Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` notification and their respective :ref:`_ready<class_Node_private_method__ready>` callbacks are triggered. For groups of nodes, the :ref:`_ready<class_Node_private_method__ready>` callback is called in reverse order, starting with the children and moving up to the parent nodes.
- This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree<class_Node_private_method__enter_tree>` of the parent, :ref:`_enter_tree<class_Node_private_method__enter_tree>` of the children, :ref:`_ready<class_Node_private_method__ready>` of the children and finally :ref:`_ready<class_Node_private_method__ready>` of the parent (recursively for the entire scene tree).
- \ **Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process<class_Node_private_method__process>`, toggled with :ref:`set_process<class_Node_method_set_process>`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* (in seconds) is passed as an argument. Physics processing (callback :ref:`_physics_process<class_Node_private_method__physics_process>`, toggled with :ref:`set_physics_process<class_Node_method_set_physics_process>`) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
- Nodes can also process input events. When present, the :ref:`_input<class_Node_private_method__input>` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control<class_Control>` nodes), ensuring that the node only receives the events that were meant for it.
- To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the :ref:`owner<class_Node_property_owner>` property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though.
- Finally, when a node is freed with :ref:`Object.free<class_Object_method_free>` or :ref:`queue_free<class_Node_method_queue_free>`, it will also free all its children.
- \ **Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See :ref:`add_to_group<class_Node_method_add_to_group>`, :ref:`is_in_group<class_Node_method_is_in_group>` and :ref:`remove_from_group<class_Node_method_remove_from_group>`. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on :ref:`SceneTree<class_SceneTree>`.
- \ **Networking with nodes:** After connecting to a server (or making one, see :ref:`ENetMultiplayerPeer<class_ENetMultiplayerPeer>`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`rpc<class_Node_method_rpc>` with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its :ref:`NodePath<class_NodePath>` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos.
- \ **Note:** The ``script`` property is part of the :ref:`Object<class_Object>` class, not **Node**. It isn't exposed like most properties but does have a setter and getter (``set_script()`` and ``get_script()``).
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`Nodes and scenes <../getting_started/step_by_step/nodes_and_scenes>`
- - `All Demos <https://github.com/godotengine/godot-demo-projects/>`__
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`String<class_String>` | :ref:`editor_description<class_Node_property_editor_description>` | ``""`` |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`multiplayer<class_Node_property_multiplayer>` | |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`StringName<class_StringName>` | :ref:`name<class_Node_property_name>` | |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`Node<class_Node>` | :ref:`owner<class_Node_property_owner>` | |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`ProcessMode<enum_Node_ProcessMode>` | :ref:`process_mode<class_Node_property_process_mode>` | ``0`` |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`process_physics_priority<class_Node_property_process_physics_priority>` | ``0`` |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`process_priority<class_Node_property_process_priority>` | ``0`` |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` | :ref:`process_thread_group<class_Node_property_process_thread_group>` | ``0`` |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`process_thread_group_order<class_Node_property_process_thread_group_order>` | |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | |bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> | :ref:`process_thread_messages<class_Node_property_process_thread_messages>` | |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`String<class_String>` | :ref:`scene_file_path<class_Node_property_scene_file_path>` | |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>` | ``false`` |
- +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_enter_tree<class_Node_private_method__enter_tree>` **(** **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_exit_tree<class_Node_private_method__exit_tree>` **(** **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_configuration_warnings<class_Node_private_method__get_configuration_warnings>` **(** **)** |virtual| |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_input<class_Node_private_method__input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_physics_process<class_Node_private_method__physics_process>` **(** :ref:`float<class_float>` delta **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_process<class_Node_private_method__process>` **(** :ref:`float<class_float>` delta **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_ready<class_Node_private_method__ready>` **(** **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_child<class_Node_method_add_child>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` force_readable_name=false, :ref:`InternalMode<enum_Node_InternalMode>` internal=0 **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_sibling<class_Node_method_add_sibling>` **(** :ref:`Node<class_Node>` sibling, :ref:`bool<class_bool>` force_readable_name=false **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_to_group<class_Node_method_add_to_group>` **(** :ref:`StringName<class_StringName>` group, :ref:`bool<class_bool>` persistent=false **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_Variant>` | :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_Variant>` | :ref:`call_thread_safe<class_Node_method_call_thread_safe>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`can_process<class_Node_method_can_process>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Tween<class_Tween>` | :ref:`create_tween<class_Node_method_create_tween>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node<class_Node>` | :ref:`duplicate<class_Node_method_duplicate>` **(** :ref:`int<class_int>` flags=15 **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node<class_Node>` | :ref:`find_child<class_Node_method_find_child>` **(** :ref:`String<class_String>` pattern, :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node[]<class_Node>` | :ref:`find_children<class_Node_method_find_children>` **(** :ref:`String<class_String>` pattern, :ref:`String<class_String>` type="", :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node<class_Node>` | :ref:`find_parent<class_Node_method_find_parent>` **(** :ref:`String<class_String>` pattern **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node<class_Node>` | :ref:`get_child<class_Node_method_get_child>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` include_internal=false **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_child_count<class_Node_method_get_child_count>` **(** :ref:`bool<class_bool>` include_internal=false **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node[]<class_Node>` | :ref:`get_children<class_Node_method_get_children>` **(** :ref:`bool<class_bool>` include_internal=false **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`StringName[]<class_StringName>` | :ref:`get_groups<class_Node_method_get_groups>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_index<class_Node_method_get_index>` **(** :ref:`bool<class_bool>` include_internal=false **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Window<class_Window>` | :ref:`get_last_exclusive_window<class_Node_method_get_last_exclusive_window>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_multiplayer_authority<class_Node_method_get_multiplayer_authority>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node<class_Node>` | :ref:`get_node<class_Node_method_get_node>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`get_node_and_resource<class_Node_method_get_node_and_resource>` **(** :ref:`NodePath<class_NodePath>` path **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node<class_Node>` | :ref:`get_node_or_null<class_Node_method_get_node_or_null>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Node<class_Node>` | :ref:`get_parent<class_Node_method_get_parent>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`NodePath<class_NodePath>` | :ref:`get_path<class_Node_method_get_path>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`NodePath<class_NodePath>` | :ref:`get_path_to<class_Node_method_get_path_to>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` use_unique_path=false **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_physics_process_delta_time<class_Node_method_get_physics_process_delta_time>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_process_delta_time<class_Node_method_get_process_delta_time>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`get_scene_instance_load_placeholder<class_Node_method_get_scene_instance_load_placeholder>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`SceneTree<class_SceneTree>` | :ref:`get_tree<class_Node_method_get_tree>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_tree_string<class_Node_method_get_tree_string>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_tree_string_pretty<class_Node_method_get_tree_string_pretty>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Viewport<class_Viewport>` | :ref:`get_viewport<class_Node_method_get_viewport>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Window<class_Window>` | :ref:`get_window<class_Node_method_get_window>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_node<class_Node_method_has_node>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_node_and_resource<class_Node_method_has_node_and_resource>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_ancestor_of<class_Node_method_is_ancestor_of>` **(** :ref:`Node<class_Node>` node **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_displayed_folded<class_Node_method_is_displayed_folded>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_editable_instance<class_Node_method_is_editable_instance>` **(** :ref:`Node<class_Node>` node **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_greater_than<class_Node_method_is_greater_than>` **(** :ref:`Node<class_Node>` node **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_in_group<class_Node_method_is_in_group>` **(** :ref:`StringName<class_StringName>` group **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_inside_tree<class_Node_method_is_inside_tree>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_multiplayer_authority<class_Node_method_is_multiplayer_authority>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_node_ready<class_Node_method_is_node_ready>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_physics_processing<class_Node_method_is_physics_processing>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_physics_processing_internal<class_Node_method_is_physics_processing_internal>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_processing<class_Node_method_is_processing>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_processing_input<class_Node_method_is_processing_input>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_processing_internal<class_Node_method_is_processing_internal>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_processing_shortcut_input<class_Node_method_is_processing_shortcut_input>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_input<class_Node_method_is_processing_unhandled_input>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_key_input<class_Node_method_is_processing_unhandled_key_input>` **(** **)** |const| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`move_child<class_Node_method_move_child>` **(** :ref:`Node<class_Node>` child_node, :ref:`int<class_int>` to_index **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`notify_deferred_thread_group<class_Node_method_notify_deferred_thread_group>` **(** :ref:`int<class_int>` what **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`notify_thread_safe<class_Node_method_notify_thread_safe>` **(** :ref:`int<class_int>` what **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>` **(** **)** |static| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`print_tree<class_Node_method_print_tree>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`print_tree_pretty<class_Node_method_print_tree_pretty>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`propagate_call<class_Node_method_propagate_call>` **(** :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` args=[], :ref:`bool<class_bool>` parent_first=false **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`propagate_notification<class_Node_method_propagate_notification>` **(** :ref:`int<class_int>` what **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`queue_free<class_Node_method_queue_free>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_child<class_Node_method_remove_child>` **(** :ref:`Node<class_Node>` node **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_from_group<class_Node_method_remove_from_group>` **(** :ref:`StringName<class_StringName>` group **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`reparent<class_Node_method_reparent>` **(** :ref:`Node<class_Node>` new_parent, :ref:`bool<class_bool>` keep_global_transform=true **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`replace_by<class_Node_method_replace_by>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` keep_groups=false **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`request_ready<class_Node_method_request_ready>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc<class_Node_method_rpc>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`rpc_config<class_Node_method_rpc_config>` **(** :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` config **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc_id<class_Node_method_rpc_id>` **(** :ref:`int<class_int>` peer_id, :ref:`StringName<class_StringName>` method, ... **)** |vararg| |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_deferred_thread_group<class_Node_method_set_deferred_thread_group>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_display_folded<class_Node_method_set_display_folded>` **(** :ref:`bool<class_bool>` fold **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_editable_instance<class_Node_method_set_editable_instance>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` is_editable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_multiplayer_authority<class_Node_method_set_multiplayer_authority>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` recursive=true **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_physics_process<class_Node_method_set_physics_process>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_process<class_Node_method_set_process>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_process_input<class_Node_method_set_process_input>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_process_internal<class_Node_method_set_process_internal>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>` **(** :ref:`bool<class_bool>` enable **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_scene_instance_load_placeholder<class_Node_method_set_scene_instance_load_placeholder>` **(** :ref:`bool<class_bool>` load_placeholder **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_thread_safe<class_Node_method_set_thread_safe>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`update_configuration_warnings<class_Node_method_update_configuration_warnings>` **(** **)** |
- +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Signals
- -------
- .. _class_Node_signal_child_entered_tree:
- .. rst-class:: classref-signal
- **child_entered_tree** **(** :ref:`Node<class_Node>` node **)**
- Emitted when a child node enters the scene tree, either because it entered on its own or because this node entered with it.
- This signal is emitted *after* the child node's own :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` and :ref:`tree_entered<class_Node_signal_tree_entered>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_child_exiting_tree:
- .. rst-class:: classref-signal
- **child_exiting_tree** **(** :ref:`Node<class_Node>` node **)**
- Emitted when a child node is about to exit the scene tree, either because it is being removed or freed directly, or because this node is exiting the tree.
- When this signal is received, the child ``node`` is still in the tree and valid. This signal is emitted *after* the child node's own :ref:`tree_exiting<class_Node_signal_tree_exiting>` and :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_child_order_changed:
- .. rst-class:: classref-signal
- **child_order_changed** **(** **)**
- Emitted when the list of children is changed. This happens when child nodes are added, moved or removed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_ready:
- .. rst-class:: classref-signal
- **ready** **(** **)**
- Emitted when the node is ready. Comes after :ref:`_ready<class_Node_private_method__ready>` callback and follows the same rules.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_renamed:
- .. rst-class:: classref-signal
- **renamed** **(** **)**
- Emitted when the node is renamed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_replacing_by:
- .. rst-class:: classref-signal
- **replacing_by** **(** :ref:`Node<class_Node>` node **)**
- Emitted when this node is being replaced by the ``node``, see :ref:`replace_by<class_Node_method_replace_by>`.
- This signal is emitted *after* ``node`` has been added as a child of the original parent node, but *before* all original child nodes have been reparented to ``node``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_tree_entered:
- .. rst-class:: classref-signal
- **tree_entered** **(** **)**
- Emitted when the node enters the tree.
- This signal is emitted *after* the related :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_tree_exited:
- .. rst-class:: classref-signal
- **tree_exited** **(** **)**
- Emitted after the node exits the tree and is no longer active.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_signal_tree_exiting:
- .. rst-class:: classref-signal
- **tree_exiting** **(** **)**
- Emitted when the node is still active but about to exit the tree. This is the right place for de-initialization (or a "destructor", if you will).
- This signal is emitted *before* the related :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` notification.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_Node_ProcessMode:
- .. rst-class:: classref-enumeration
- enum **ProcessMode**:
- .. _class_Node_constant_PROCESS_MODE_INHERIT:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_INHERIT** = ``0``
- Inherits process mode from the node's parent. For the root node, it is equivalent to :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`. Default.
- .. _class_Node_constant_PROCESS_MODE_PAUSABLE:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_PAUSABLE** = ``1``
- Stops processing when the :ref:`SceneTree<class_SceneTree>` is paused (process when unpaused). This is the inverse of :ref:`PROCESS_MODE_WHEN_PAUSED<class_Node_constant_PROCESS_MODE_WHEN_PAUSED>`.
- .. _class_Node_constant_PROCESS_MODE_WHEN_PAUSED:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_WHEN_PAUSED** = ``2``
- Only process when the :ref:`SceneTree<class_SceneTree>` is paused (don't process when unpaused). This is the inverse of :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`.
- .. _class_Node_constant_PROCESS_MODE_ALWAYS:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_ALWAYS** = ``3``
- Always process. Continue processing always, ignoring the :ref:`SceneTree<class_SceneTree>`'s paused property. This is the inverse of :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
- .. _class_Node_constant_PROCESS_MODE_DISABLED:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_DISABLED** = ``4``
- Never process. Completely disables processing, ignoring the :ref:`SceneTree<class_SceneTree>`'s paused property. This is the inverse of :ref:`PROCESS_MODE_ALWAYS<class_Node_constant_PROCESS_MODE_ALWAYS>`.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_Node_ProcessThreadGroup:
- .. rst-class:: classref-enumeration
- enum **ProcessThreadGroup**:
- .. _class_Node_constant_PROCESS_THREAD_GROUP_INHERIT:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_INHERIT** = ``0``
- If the :ref:`process_thread_group<class_Node_property_process_thread_group>` property is sent to this, the node will belong to any parent (or grandparent) node that has a thread group mode that is not inherit. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information.
- .. _class_Node_constant_PROCESS_THREAD_GROUP_MAIN_THREAD:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_MAIN_THREAD** = ``1``
- Process this node (and children nodes set to inherit) on the main thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information.
- .. _class_Node_constant_PROCESS_THREAD_GROUP_SUB_THREAD:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_SUB_THREAD** = ``2``
- Process this node (and children nodes set to inherit) on a sub-thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_Node_ProcessThreadMessages:
- .. rst-class:: classref-enumeration
- flags **ProcessThreadMessages**:
- .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES** = ``1``
- .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_PHYSICS:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES_PHYSICS** = ``2``
- .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_ALL:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES_ALL** = ``3``
- .. rst-class:: classref-item-separator
- ----
- .. _enum_Node_DuplicateFlags:
- .. rst-class:: classref-enumeration
- enum **DuplicateFlags**:
- .. _class_Node_constant_DUPLICATE_SIGNALS:
- .. rst-class:: classref-enumeration-constant
- :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_SIGNALS** = ``1``
- Duplicate the node's signals.
- .. _class_Node_constant_DUPLICATE_GROUPS:
- .. rst-class:: classref-enumeration-constant
- :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_GROUPS** = ``2``
- Duplicate the node's groups.
- .. _class_Node_constant_DUPLICATE_SCRIPTS:
- .. rst-class:: classref-enumeration-constant
- :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_SCRIPTS** = ``4``
- Duplicate the node's scripts.
- .. _class_Node_constant_DUPLICATE_USE_INSTANTIATION:
- .. rst-class:: classref-enumeration-constant
- :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_USE_INSTANTIATION** = ``8``
- Duplicate using instancing.
- An instance stays linked to the original so when the original changes, the instance changes too.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_Node_InternalMode:
- .. rst-class:: classref-enumeration
- enum **InternalMode**:
- .. _class_Node_constant_INTERNAL_MODE_DISABLED:
- .. rst-class:: classref-enumeration-constant
- :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_DISABLED** = ``0``
- Node will not be internal.
- .. _class_Node_constant_INTERNAL_MODE_FRONT:
- .. rst-class:: classref-enumeration-constant
- :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_FRONT** = ``1``
- Node will be placed at the front of parent's node list, before any non-internal sibling.
- .. _class_Node_constant_INTERNAL_MODE_BACK:
- .. rst-class:: classref-enumeration-constant
- :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_BACK** = ``2``
- Node will be placed at the back of parent's node list, after any non-internal sibling.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Constants
- ---------
- .. _class_Node_constant_NOTIFICATION_ENTER_TREE:
- .. rst-class:: classref-constant
- **NOTIFICATION_ENTER_TREE** = ``10``
- Notification received when the node enters a :ref:`SceneTree<class_SceneTree>`.
- This notification is emitted *before* the related :ref:`tree_entered<class_Node_signal_tree_entered>`.
- .. _class_Node_constant_NOTIFICATION_EXIT_TREE:
- .. rst-class:: classref-constant
- **NOTIFICATION_EXIT_TREE** = ``11``
- Notification received when the node is about to exit a :ref:`SceneTree<class_SceneTree>`.
- This notification is emitted *after* the related :ref:`tree_exiting<class_Node_signal_tree_exiting>`.
- .. _class_Node_constant_NOTIFICATION_MOVED_IN_PARENT:
- .. rst-class:: classref-constant
- **NOTIFICATION_MOVED_IN_PARENT** = ``12``
- *Deprecated.* This notification is no longer emitted. Use :ref:`NOTIFICATION_CHILD_ORDER_CHANGED<class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED>` instead.
- .. _class_Node_constant_NOTIFICATION_READY:
- .. rst-class:: classref-constant
- **NOTIFICATION_READY** = ``13``
- Notification received when the node is ready. See :ref:`_ready<class_Node_private_method__ready>`.
- .. _class_Node_constant_NOTIFICATION_PAUSED:
- .. rst-class:: classref-constant
- **NOTIFICATION_PAUSED** = ``14``
- Notification received when the node is paused.
- .. _class_Node_constant_NOTIFICATION_UNPAUSED:
- .. rst-class:: classref-constant
- **NOTIFICATION_UNPAUSED** = ``15``
- Notification received when the node is unpaused.
- .. _class_Node_constant_NOTIFICATION_PHYSICS_PROCESS:
- .. rst-class:: classref-constant
- **NOTIFICATION_PHYSICS_PROCESS** = ``16``
- Notification received every frame when the physics process flag is set (see :ref:`set_physics_process<class_Node_method_set_physics_process>`).
- .. _class_Node_constant_NOTIFICATION_PROCESS:
- .. rst-class:: classref-constant
- **NOTIFICATION_PROCESS** = ``17``
- Notification received every frame when the process flag is set (see :ref:`set_process<class_Node_method_set_process>`).
- .. _class_Node_constant_NOTIFICATION_PARENTED:
- .. rst-class:: classref-constant
- **NOTIFICATION_PARENTED** = ``18``
- Notification received when a node is set as a child of another node.
- \ **Note:** This doesn't mean that a node entered the :ref:`SceneTree<class_SceneTree>`.
- .. _class_Node_constant_NOTIFICATION_UNPARENTED:
- .. rst-class:: classref-constant
- **NOTIFICATION_UNPARENTED** = ``19``
- Notification received when a node is unparented (parent removed it from the list of children).
- .. _class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED:
- .. rst-class:: classref-constant
- **NOTIFICATION_SCENE_INSTANTIATED** = ``20``
- Notification received by scene owner when its scene is instantiated.
- .. _class_Node_constant_NOTIFICATION_DRAG_BEGIN:
- .. rst-class:: classref-constant
- **NOTIFICATION_DRAG_BEGIN** = ``21``
- Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.
- Can be triggered either by dragging a :ref:`Control<class_Control>` that provides drag data (see :ref:`Control._get_drag_data<class_Control_private_method__get_drag_data>`) or using :ref:`Control.force_drag<class_Control_method_force_drag>`.
- Use :ref:`Viewport.gui_get_drag_data<class_Viewport_method_gui_get_drag_data>` to get the dragged data.
- .. _class_Node_constant_NOTIFICATION_DRAG_END:
- .. rst-class:: classref-constant
- **NOTIFICATION_DRAG_END** = ``22``
- Notification received when a drag operation ends.
- Use :ref:`Viewport.gui_is_drag_successful<class_Viewport_method_gui_is_drag_successful>` to check if the drag succeeded.
- .. _class_Node_constant_NOTIFICATION_PATH_RENAMED:
- .. rst-class:: classref-constant
- **NOTIFICATION_PATH_RENAMED** = ``23``
- Notification received when the node's name or one of its parents' name is changed. This notification is *not* received when the node is removed from the scene tree to be added to another parent later on.
- .. _class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED:
- .. rst-class:: classref-constant
- **NOTIFICATION_CHILD_ORDER_CHANGED** = ``24``
- Notification received when the list of children is changed. This happens when child nodes are added, moved or removed.
- .. _class_Node_constant_NOTIFICATION_INTERNAL_PROCESS:
- .. rst-class:: classref-constant
- **NOTIFICATION_INTERNAL_PROCESS** = ``25``
- Notification received every frame when the internal process flag is set (see :ref:`set_process_internal<class_Node_method_set_process_internal>`).
- .. _class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS:
- .. rst-class:: classref-constant
- **NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = ``26``
- Notification received every frame when the internal physics process flag is set (see :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`).
- .. _class_Node_constant_NOTIFICATION_POST_ENTER_TREE:
- .. rst-class:: classref-constant
- **NOTIFICATION_POST_ENTER_TREE** = ``27``
- Notification received when the node is ready, just before :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` is received. Unlike the latter, it's sent every time the node enters the tree, instead of only once.
- .. _class_Node_constant_NOTIFICATION_DISABLED:
- .. rst-class:: classref-constant
- **NOTIFICATION_DISABLED** = ``28``
- Notification received when the node is disabled. See :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
- .. _class_Node_constant_NOTIFICATION_ENABLED:
- .. rst-class:: classref-constant
- **NOTIFICATION_ENABLED** = ``29``
- Notification received when the node is enabled again after being disabled. See :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
- .. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE:
- .. rst-class:: classref-constant
- **NOTIFICATION_EDITOR_PRE_SAVE** = ``9001``
- Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
- .. _class_Node_constant_NOTIFICATION_EDITOR_POST_SAVE:
- .. rst-class:: classref-constant
- **NOTIFICATION_EDITOR_POST_SAVE** = ``9002``
- Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
- .. _class_Node_constant_NOTIFICATION_WM_MOUSE_ENTER:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_MOUSE_ENTER** = ``1002``
- Notification received when the mouse enters the window.
- Implemented for embedded windows and on desktop and web platforms.
- .. _class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_MOUSE_EXIT** = ``1003``
- Notification received when the mouse leaves the window.
- Implemented for embedded windows and on desktop and web platforms.
- .. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_WINDOW_FOCUS_IN** = ``1004``
- Notification received when the node's parent :ref:`Window<class_Window>` is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case :ref:`NOTIFICATION_APPLICATION_FOCUS_IN<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN>` is also emitted).
- A :ref:`Window<class_Window>` node receives this notification when it is focused.
- .. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_OUT:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_WINDOW_FOCUS_OUT** = ``1005``
- Notification received when the node's parent :ref:`Window<class_Window>` is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case :ref:`NOTIFICATION_APPLICATION_FOCUS_OUT<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT>` is also emitted).
- A :ref:`Window<class_Window>` node receives this notification when it is defocused.
- .. _class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_CLOSE_REQUEST** = ``1006``
- Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or :kbd:`Alt + F4`).
- Implemented on desktop platforms.
- .. _class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_GO_BACK_REQUEST** = ``1007``
- Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
- Specific to the Android platform.
- .. _class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_SIZE_CHANGED** = ``1008``
- Notification received from the OS when the window is resized.
- .. _class_Node_constant_NOTIFICATION_WM_DPI_CHANGE:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_DPI_CHANGE** = ``1009``
- Notification received from the OS when the screen's DPI has been changed. Only implemented on macOS.
- .. _class_Node_constant_NOTIFICATION_VP_MOUSE_ENTER:
- .. rst-class:: classref-constant
- **NOTIFICATION_VP_MOUSE_ENTER** = ``1010``
- Notification received when the mouse cursor enters the :ref:`Viewport<class_Viewport>`'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or :ref:`Window<class_Window>`\ s, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not.
- .. _class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT:
- .. rst-class:: classref-constant
- **NOTIFICATION_VP_MOUSE_EXIT** = ``1011``
- Notification received when the mouse cursor leaves the :ref:`Viewport<class_Viewport>`'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or :ref:`Window<class_Window>`\ s, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not.
- .. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING:
- .. rst-class:: classref-constant
- **NOTIFICATION_OS_MEMORY_WARNING** = ``2009``
- Notification received from the OS when the application is exceeding its allocated memory.
- Specific to the iOS platform.
- .. _class_Node_constant_NOTIFICATION_TRANSLATION_CHANGED:
- .. rst-class:: classref-constant
- **NOTIFICATION_TRANSLATION_CHANGED** = ``2010``
- Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr<class_Object_method_tr>`.
- .. _class_Node_constant_NOTIFICATION_WM_ABOUT:
- .. rst-class:: classref-constant
- **NOTIFICATION_WM_ABOUT** = ``2011``
- Notification received from the OS when a request for "About" information is sent.
- Specific to the macOS platform.
- .. _class_Node_constant_NOTIFICATION_CRASH:
- .. rst-class:: classref-constant
- **NOTIFICATION_CRASH** = ``2012``
- Notification received from Godot's crash handler when the engine is about to crash.
- Implemented on desktop platforms if the crash handler is enabled.
- .. _class_Node_constant_NOTIFICATION_OS_IME_UPDATE:
- .. rst-class:: classref-constant
- **NOTIFICATION_OS_IME_UPDATE** = ``2013``
- Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
- Specific to the macOS platform.
- .. _class_Node_constant_NOTIFICATION_APPLICATION_RESUMED:
- .. rst-class:: classref-constant
- **NOTIFICATION_APPLICATION_RESUMED** = ``2014``
- Notification received from the OS when the application is resumed.
- Specific to the Android platform.
- .. _class_Node_constant_NOTIFICATION_APPLICATION_PAUSED:
- .. rst-class:: classref-constant
- **NOTIFICATION_APPLICATION_PAUSED** = ``2015``
- Notification received from the OS when the application is paused.
- Specific to the Android platform.
- .. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN:
- .. rst-class:: classref-constant
- **NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016``
- Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance.
- Implemented on desktop platforms.
- .. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT:
- .. rst-class:: classref-constant
- **NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017``
- Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application.
- Implemented on desktop platforms.
- .. _class_Node_constant_NOTIFICATION_TEXT_SERVER_CHANGED:
- .. rst-class:: classref-constant
- **NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018``
- Notification received when text server is changed.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_Node_property_editor_description:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **editor_description** = ``""``
- .. rst-class:: classref-property-setget
- - void **set_editor_description** **(** :ref:`String<class_String>` value **)**
- - :ref:`String<class_String>` **get_editor_description** **(** **)**
- Add a custom description to a node. It will be displayed in a tooltip when hovered in editor's scene tree.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_multiplayer:
- .. rst-class:: classref-property
- :ref:`MultiplayerAPI<class_MultiplayerAPI>` **multiplayer**
- .. rst-class:: classref-property-setget
- - :ref:`MultiplayerAPI<class_MultiplayerAPI>` **get_multiplayer** **(** **)**
- The :ref:`MultiplayerAPI<class_MultiplayerAPI>` instance associated with this node. See :ref:`SceneTree.get_multiplayer<class_SceneTree_method_get_multiplayer>`.
- \ **Note:** Renaming the node, or moving it in the tree, will not move the :ref:`MultiplayerAPI<class_MultiplayerAPI>` to the new path, you will have to update this manually.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_name:
- .. rst-class:: classref-property
- :ref:`StringName<class_StringName>` **name**
- .. rst-class:: classref-property-setget
- - void **set_name** **(** :ref:`StringName<class_StringName>` value **)**
- - :ref:`StringName<class_StringName>` **get_name** **(** **)**
- The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.
- \ **Note:** Auto-generated names might include the ``@`` character, which is reserved for unique names when using :ref:`add_child<class_Node_method_add_child>`. When setting the name manually, any ``@`` will be removed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_owner:
- .. rst-class:: classref-property
- :ref:`Node<class_Node>` **owner**
- .. rst-class:: classref-property-setget
- - void **set_owner** **(** :ref:`Node<class_Node>` value **)**
- - :ref:`Node<class_Node>` **get_owner** **(** **)**
- The node owner. A node can have any ancestor node as owner (i.e. a parent, grandparent, etc. node ascending in the tree). This implies that :ref:`add_child<class_Node_method_add_child>` should be called before setting the owner, so that this relationship of parenting exists. When saving a node (using :ref:`PackedScene<class_PackedScene>`), all the nodes it owns will be saved with it. This allows for the creation of complex scene trees, with instancing and subinstancing.
- \ **Note:** If you want a child to be persisted to a :ref:`PackedScene<class_PackedScene>`, you must set :ref:`owner<class_Node_property_owner>` in addition to calling :ref:`add_child<class_Node_method_add_child>`. This is typically relevant for :doc:`tool scripts <../tutorials/plugins/running_code_in_the_editor>` and :doc:`editor plugins <../tutorials/plugins/editor/index>`. If a new node is added to the tree without setting its owner as an ancestor in that tree, it will be visible in the 2D/3D view, but not in the scene tree (and not persisted when packing or saving).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_process_mode:
- .. rst-class:: classref-property
- :ref:`ProcessMode<enum_Node_ProcessMode>` **process_mode** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_process_mode** **(** :ref:`ProcessMode<enum_Node_ProcessMode>` value **)**
- - :ref:`ProcessMode<enum_Node_ProcessMode>` **get_process_mode** **(** **)**
- Can be used to pause or unpause the node, or make the node paused based on the :ref:`SceneTree<class_SceneTree>`, or make it inherit the process mode from its parent (default).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_process_physics_priority:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **process_physics_priority** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_physics_process_priority** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_physics_process_priority** **(** **)**
- Similar to :ref:`process_priority<class_Node_property_process_priority>` but for :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, :ref:`_physics_process<class_Node_private_method__physics_process>` or the internal version.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_process_priority:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **process_priority** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_process_priority** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_process_priority** **(** **)**
- The node's priority in the execution order of the enabled processing callbacks (i.e. :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` and their internal counterparts). Nodes whose process priority value is *lower* will have their processing callbacks executed first.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_process_thread_group:
- .. rst-class:: classref-property
- :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **process_thread_group** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_process_thread_group** **(** :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` value **)**
- - :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **get_process_thread_group** **(** **)**
- Set the process thread group for this node (basically, whether it receives :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, :ref:`_process<class_Node_private_method__process>` or :ref:`_physics_process<class_Node_private_method__physics_process>` (and the internal versions) on the main thread or in a sub-thread.
- By default, the thread group is :ref:`PROCESS_THREAD_GROUP_INHERIT<class_Node_constant_PROCESS_THREAD_GROUP_INHERIT>`, which means that this node belongs to the same thread group as the parent node. The thread groups means that nodes in a specific thread group will process together, separate to other thread groups (depending on :ref:`process_thread_group_order<class_Node_property_process_thread_group_order>`). If the value is set is :ref:`PROCESS_THREAD_GROUP_SUB_THREAD<class_Node_constant_PROCESS_THREAD_GROUP_SUB_THREAD>`, this thread group will occur on a sub thread (not the main thread), otherwise if set to :ref:`PROCESS_THREAD_GROUP_MAIN_THREAD<class_Node_constant_PROCESS_THREAD_GROUP_MAIN_THREAD>` it will process on the main thread. If there is not a parent or grandparent node set to something other than inherit, the node will belong to the *default thread group*. This default group will process on the main thread and its group order is 0.
- During processing in a sub-thread, accessing most functions in nodes outside the thread group is forbidden (and it will result in an error in debug mode). Use :ref:`Object.call_deferred<class_Object_method_call_deferred>`, :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` and the likes in order to communicate from the thread groups to the main thread (or to other thread groups).
- To better understand process thread groups, the idea is that any node set to any other value than :ref:`PROCESS_THREAD_GROUP_INHERIT<class_Node_constant_PROCESS_THREAD_GROUP_INHERIT>` will include any children (and grandchildren) nodes set to inherit into its process thread group. this means that the processing of all the nodes in the group will happen together, at the same time as the node including them.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_process_thread_group_order:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **process_thread_group_order**
- .. rst-class:: classref-property-setget
- - void **set_process_thread_group_order** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_process_thread_group_order** **(** **)**
- Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of nodes process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_process_thread_messages:
- .. rst-class:: classref-property
- |bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> **process_thread_messages**
- .. rst-class:: classref-property-setget
- - void **set_process_thread_messages** **(** |bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> value **)**
- - |bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> **get_process_thread_messages** **(** **)**
- Set whether the current thread group will process messages (calls to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` on threads, and whether it wants to receive them during regular process or physics process callbacks.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_scene_file_path:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **scene_file_path**
- .. rst-class:: classref-property-setget
- - void **set_scene_file_path** **(** :ref:`String<class_String>` value **)**
- - :ref:`String<class_String>` **get_scene_file_path** **(** **)**
- If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in :ref:`scene_file_path<class_Node_property_scene_file_path>` (e.g. ``res://levels/1.tscn``). Otherwise, :ref:`scene_file_path<class_Node_property_scene_file_path>` is set to an empty string.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_property_unique_name_in_owner:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **unique_name_in_owner** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_unique_name_in_owner** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_unique_name_in_owner** **(** **)**
- Sets this node's name as a unique name in its :ref:`owner<class_Node_property_owner>`. This allows the node to be accessed as ``%Name`` instead of the full path, from any node within that scene.
- If another node with the same owner already had that name declared as unique, that other node's name will no longer be set as having a unique name.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_Node_private_method__enter_tree:
- .. rst-class:: classref-method
- void **_enter_tree** **(** **)** |virtual|
- Called when the node enters the :ref:`SceneTree<class_SceneTree>` (e.g. upon instancing, scene changing, or after calling :ref:`add_child<class_Node_method_add_child>` in a script). If the node has children, its :ref:`_enter_tree<class_Node_private_method__enter_tree>` callback will be called first, and then that of the children.
- Corresponds to the :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification in :ref:`Object._notification<class_Object_private_method__notification>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__exit_tree:
- .. rst-class:: classref-method
- void **_exit_tree** **(** **)** |virtual|
- Called when the node is about to leave the :ref:`SceneTree<class_SceneTree>` (e.g. upon freeing, scene changing, or after calling :ref:`remove_child<class_Node_method_remove_child>` in a script). If the node has children, its :ref:`_exit_tree<class_Node_private_method__exit_tree>` callback will be called last, after all its children have left the tree.
- Corresponds to the :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` notification in :ref:`Object._notification<class_Object_private_method__notification>` and signal :ref:`tree_exiting<class_Node_signal_tree_exiting>`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited<class_Node_signal_tree_exited>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__get_configuration_warnings:
- .. rst-class:: classref-method
- :ref:`PackedStringArray<class_PackedStringArray>` **_get_configuration_warnings** **(** **)** |virtual| |const|
- The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a ``tool`` script.
- Returning an empty array produces no warnings.
- Call :ref:`update_configuration_warnings<class_Node_method_update_configuration_warnings>` when the warnings need to be updated for this node.
- ::
- @export var energy = 0:
- set(value):
- energy = value
- update_configuration_warnings()
-
- func _get_configuration_warnings():
- if energy < 0:
- return ["Energy must be 0 or greater."]
- else:
- return []
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__input:
- .. rst-class:: classref-method
- void **_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
- Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
- It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_input<class_Node_method_set_process_input>`.
- To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled<class_Viewport_method_set_input_as_handled>` can be called.
- For gameplay input, :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` and :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` are usually a better fit as they allow the GUI to intercept the events first.
- \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__physics_process:
- .. rst-class:: classref-method
- void **_physics_process** **(** :ref:`float<class_float>` delta **)** |virtual|
- Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the ``delta`` variable should be constant. ``delta`` is in seconds.
- It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_physics_process<class_Node_method_set_physics_process>`.
- Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` notification in :ref:`Object._notification<class_Object_private_method__notification>`.
- \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__process:
- .. rst-class:: classref-method
- void **_process** **(** :ref:`float<class_float>` delta **)** |virtual|
- Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the ``delta`` time since the previous frame is not constant. ``delta`` is in seconds.
- It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process<class_Node_method_set_process>`.
- Corresponds to the :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` notification in :ref:`Object._notification<class_Object_private_method__notification>`.
- \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__ready:
- .. rst-class:: classref-method
- void **_ready** **(** **)** |virtual|
- Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready<class_Node_private_method__ready>` callbacks get triggered first, and the parent node will receive the ready notification afterwards.
- Corresponds to the :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` notification in :ref:`Object._notification<class_Object_private_method__notification>`. See also the ``@onready`` annotation for variables.
- Usually used for initialization. For even earlier initialization, :ref:`Object._init<class_Object_private_method__init>` may be used. See also :ref:`_enter_tree<class_Node_private_method__enter_tree>`.
- \ **Note:** :ref:`_ready<class_Node_private_method__ready>` may be called only once for each node. After removing a node from the scene tree and adding it again, :ref:`_ready<class_Node_private_method__ready>` will not be called a second time. This can be bypassed by requesting another call with :ref:`request_ready<class_Node_method_request_ready>`, which may be called anywhere before adding the node again.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__shortcut_input:
- .. rst-class:: classref-method
- void **_shortcut_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
- Called when an :ref:`InputEventKey<class_InputEventKey>` or :ref:`InputEventShortcut<class_InputEventShortcut>` hasn't been consumed by :ref:`_input<class_Node_private_method__input>` or any GUI :ref:`Control<class_Control>` item. It is called before :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` and :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`. The input event propagates up through the node tree until a node consumes it.
- It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>`.
- To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled<class_Viewport_method_set_input_as_handled>` can be called.
- This method can be used to handle shortcuts. For generic GUI events, use :ref:`_input<class_Node_private_method__input>` instead. Gameplay events should usually be handled with either :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` or :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>`.
- \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__unhandled_input:
- .. rst-class:: classref-method
- void **_unhandled_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
- Called when an :ref:`InputEvent<class_InputEvent>` hasn't been consumed by :ref:`_input<class_Node_private_method__input>` or any GUI :ref:`Control<class_Control>` item. It is called after :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` and after :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>`. The input event propagates up through the node tree until a node consumes it.
- It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`.
- To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled<class_Viewport_method_set_input_as_handled>` can be called.
- For gameplay input, this method is usually a better fit than :ref:`_input<class_Node_private_method__input>`, as GUI events need a higher priority. For keyboard shortcuts, consider using :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` instead, as it is called before this method. Finally, to handle keyboard events, consider using :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` for performance reasons.
- \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_private_method__unhandled_key_input:
- .. rst-class:: classref-method
- void **_unhandled_key_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
- Called when an :ref:`InputEventKey<class_InputEventKey>` hasn't been consumed by :ref:`_input<class_Node_private_method__input>` or any GUI :ref:`Control<class_Control>` item. It is called after :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` but before :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`. The input event propagates up through the node tree until a node consumes it.
- It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`.
- To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled<class_Viewport_method_set_input_as_handled>` can be called.
- This method can be used to handle Unicode character input with :kbd:`Alt`, :kbd:`Alt + Ctrl`, and :kbd:`Alt + Shift` modifiers, after shortcuts were handled.
- For gameplay input, this and :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` are usually a better fit than :ref:`_input<class_Node_private_method__input>`, as GUI events should be handled first. This method also performs better than :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`, since unrelated events such as :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` are automatically filtered. For shortcuts, consider using :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` instead.
- \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_add_child:
- .. rst-class:: classref-method
- void **add_child** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` force_readable_name=false, :ref:`InternalMode<enum_Node_InternalMode>` internal=0 **)**
- Adds a child ``node``. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
- If ``force_readable_name`` is ``true``, improves the readability of the added ``node``. If not named, the ``node`` is renamed to its type, and if it shares :ref:`name<class_Node_property_name>` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to ``false``, which assigns a dummy name featuring ``@`` in both situations.
- If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED<class_Node_constant_INTERNAL_MODE_DISABLED>`, the child will be added as internal node. Such nodes are ignored by methods like :ref:`get_children<class_Node_method_get_children>`, unless their parameter ``include_internal`` is ``true``. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. :ref:`ColorPicker<class_ColorPicker>`. See :ref:`InternalMode<enum_Node_InternalMode>` for available modes.
- \ **Note:** If the child node already has a parent, the function will fail. Use :ref:`remove_child<class_Node_method_remove_child>` first to remove the node from its current parent. For example:
- .. tabs::
- .. code-tab:: gdscript
- var child_node = get_child(0)
- if child_node.get_parent():
- child_node.get_parent().remove_child(child_node)
- add_child(child_node)
- .. code-tab:: csharp
- Node childNode = GetChild(0);
- if (childNode.GetParent() != null)
- {
- childNode.GetParent().RemoveChild(childNode);
- }
- AddChild(childNode);
- If you need the child node to be added below a specific node in the list of children, use :ref:`add_sibling<class_Node_method_add_sibling>` instead of this method.
- \ **Note:** If you want a child to be persisted to a :ref:`PackedScene<class_PackedScene>`, you must set :ref:`owner<class_Node_property_owner>` in addition to calling :ref:`add_child<class_Node_method_add_child>`. This is typically relevant for :doc:`tool scripts <../tutorials/plugins/running_code_in_the_editor>` and :doc:`editor plugins <../tutorials/plugins/editor/index>`. If :ref:`add_child<class_Node_method_add_child>` is called without setting :ref:`owner<class_Node_property_owner>`, the newly added **Node** will not be visible in the scene tree, though it will be visible in the 2D/3D view.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_add_sibling:
- .. rst-class:: classref-method
- void **add_sibling** **(** :ref:`Node<class_Node>` sibling, :ref:`bool<class_bool>` force_readable_name=false **)**
- Adds a ``sibling`` node to current's node parent, at the same level as that node, right below it.
- If ``force_readable_name`` is ``true``, improves the readability of the added ``sibling``. If not named, the ``sibling`` is renamed to its type, and if it shares :ref:`name<class_Node_property_name>` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to ``false``, which assigns a dummy name featuring ``@`` in both situations.
- Use :ref:`add_child<class_Node_method_add_child>` instead of this method if you don't need the child node to be added below a specific node in the list of children.
- \ **Note:** If this node is internal, the new sibling will be internal too (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_add_to_group:
- .. rst-class:: classref-method
- void **add_to_group** **(** :ref:`StringName<class_StringName>` group, :ref:`bool<class_bool>` persistent=false **)**
- Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`). See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`.
- The ``persistent`` option is used when packing node to :ref:`PackedScene<class_PackedScene>` and saving to file. Non-persistent groups aren't stored.
- \ **Note:** For performance reasons, the order of node groups is *not* guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_call_deferred_thread_group:
- .. rst-class:: classref-method
- :ref:`Variant<class_Variant>` **call_deferred_thread_group** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg|
- This function is similar to :ref:`Object.call_deferred<class_Object_method_call_deferred>` except that the call will take place when the node thread group is processed. If the node thread group processes in sub-threads, then the call will be done on that thread, right before :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` or :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, the :ref:`_process<class_Node_private_method__process>` or :ref:`_physics_process<class_Node_private_method__physics_process>` or their internal versions are called.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_call_thread_safe:
- .. rst-class:: classref-method
- :ref:`Variant<class_Variant>` **call_thread_safe** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg|
- This function ensures that the calling of this function will succeed, no matter whether it's being done from a thread or not. If called from a thread that is not allowed to call the function, the call will become deferred. Otherwise, the call will go through directly.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_can_process:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **can_process** **(** **)** |const|
- Returns ``true`` if the node can process while the scene tree is paused (see :ref:`process_mode<class_Node_property_process_mode>`). Always returns ``true`` if the scene tree is not paused, and ``false`` if the node is not in the tree.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_create_tween:
- .. rst-class:: classref-method
- :ref:`Tween<class_Tween>` **create_tween** **(** **)**
- Creates a new :ref:`Tween<class_Tween>` and binds it to this node. This is equivalent of doing:
- .. tabs::
- .. code-tab:: gdscript
- get_tree().create_tween().bind_node(self)
- .. code-tab:: csharp
- GetTree().CreateTween().BindNode(this);
- The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_duplicate:
- .. rst-class:: classref-method
- :ref:`Node<class_Node>` **duplicate** **(** :ref:`int<class_int>` flags=15 **)** |const|
- Duplicates the node, returning a new node.
- You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags<enum_Node_DuplicateFlags>`).
- \ **Note:** It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to :ref:`Object._init<class_Object_private_method__init>` method). In that case, the node will be duplicated without a script.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_find_child:
- .. rst-class:: classref-method
- :ref:`Node<class_Node>` **find_child** **(** :ref:`String<class_String>` pattern, :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const|
- Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match<class_String_method_match>`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- \ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``).
- If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched.
- If ``owned`` is ``true``, this method only finds nodes who have an assigned :ref:`owner<class_Node_property_owner>`. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
- Returns ``null`` if no matching **Node** is found.
- \ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using :ref:`get_node<class_Node_method_get_node>` with unique names instead (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`), or caching the node references into variable.
- \ **Note:** To find all descendant nodes matching a pattern or a class type, see :ref:`find_children<class_Node_method_find_children>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_find_children:
- .. rst-class:: classref-method
- :ref:`Node[]<class_Node>` **find_children** **(** :ref:`String<class_String>` pattern, :ref:`String<class_String>` type="", :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const|
- Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match<class_String_method_match>`, and/or type matches ``type`` as in :ref:`Object.is_class<class_Object_method_is_class>`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- \ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``).
- \ ``type`` will check equality or inheritance, and is case-sensitive. ``"Object"`` will match a node whose type is ``"Node"`` but not the other way around.
- If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched.
- If ``owned`` is ``true``, this method only finds nodes who have an assigned :ref:`owner<class_Node_property_owner>`. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
- Returns an empty array if no matching nodes are found.
- \ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get references to other nodes. Whenever possible, consider caching the node references into variables.
- \ **Note:** If you only want to find the first descendant node that matches a pattern, see :ref:`find_child<class_Node_method_find_child>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_find_parent:
- .. rst-class:: classref-method
- :ref:`Node<class_Node>` **find_parent** **(** :ref:`String<class_String>` pattern **)** |const|
- Finds the first parent of the current node whose name matches ``pattern`` as in :ref:`String.match<class_String_method_match>`.
- \ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``).
- \ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using :ref:`get_node<class_Node_method_get_node>` with unique names instead (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`), or caching the node references into variable.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_child:
- .. rst-class:: classref-method
- :ref:`Node<class_Node>` **get_child** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` include_internal=false **)** |const|
- Returns a child node by its index (see :ref:`get_child_count<class_Node_method_get_child_count>`). This method is often used for iterating all children of a node.
- Negative indices access the children from the last one.
- If ``include_internal`` is ``false``, internal children are skipped (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- To access a child node via its name, use :ref:`get_node<class_Node_method_get_node>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_child_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_child_count** **(** :ref:`bool<class_bool>` include_internal=false **)** |const|
- Returns the number of child nodes.
- If ``include_internal`` is ``false``, internal children aren't counted (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_children:
- .. rst-class:: classref-method
- :ref:`Node[]<class_Node>` **get_children** **(** :ref:`bool<class_bool>` include_internal=false **)** |const|
- Returns an array of references to node's children.
- If ``include_internal`` is ``false``, the returned array won't include internal children (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_groups:
- .. rst-class:: classref-method
- :ref:`StringName[]<class_StringName>` **get_groups** **(** **)** |const|
- Returns an array listing the groups that the node is a member of.
- \ **Note:** For performance reasons, the order of node groups is *not* guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
- \ **Note:** The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over :ref:`get_groups<class_Node_method_get_groups>`, use the following snippet:
- .. tabs::
- .. code-tab:: gdscript
- # Stores the node's non-internal groups only (as an array of Strings).
- var non_internal_groups = []
- for group in get_groups():
- if not group.begins_with("_"):
- non_internal_groups.push_back(group)
- .. code-tab:: csharp
- // Stores the node's non-internal groups only (as a List of strings).
- List<string> nonInternalGroups = new List<string>();
- foreach (string group in GetGroups())
- {
- if (!group.BeginsWith("_"))
- nonInternalGroups.Add(group);
- }
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_index:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_index** **(** :ref:`bool<class_bool>` include_internal=false **)** |const|
- Returns the node's order in the scene tree branch. For example, if called on the first child node the position is ``0``.
- If ``include_internal`` is ``false``, the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_last_exclusive_window:
- .. rst-class:: classref-method
- :ref:`Window<class_Window>` **get_last_exclusive_window** **(** **)** |const|
- Returns the :ref:`Window<class_Window>` that contains this node, or the last exclusive child in a chain of windows starting with the one that contains this node.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_multiplayer_authority:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_multiplayer_authority** **(** **)** |const|
- Returns the peer ID of the multiplayer authority for this node. See :ref:`set_multiplayer_authority<class_Node_method_set_multiplayer_authority>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_node:
- .. rst-class:: classref-method
- :ref:`Node<class_Node>` **get_node** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
- Fetches a node. The :ref:`NodePath<class_NodePath>` can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, ``null`` is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call <method> on a null instance." error.
- \ **Note:** Fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`).
- \ **Example:** Assume your current node is Character and the following tree:
- ::
- /root
- /root/Character
- /root/Character/Sword
- /root/Character/Backpack/Dagger
- /root/MyGame
- /root/Swamp/Alligator
- /root/Swamp/Mosquito
- /root/Swamp/Goblin
- Possible paths are:
- .. tabs::
- .. code-tab:: gdscript
- get_node("Sword")
- get_node("Backpack/Dagger")
- get_node("../Swamp/Alligator")
- get_node("/root/MyGame")
- .. code-tab:: csharp
- GetNode("Sword");
- GetNode("Backpack/Dagger");
- GetNode("../Swamp/Alligator");
- GetNode("/root/MyGame");
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_node_and_resource:
- .. rst-class:: classref-method
- :ref:`Array<class_Array>` **get_node_and_resource** **(** :ref:`NodePath<class_NodePath>` path **)**
- Fetches a node and one of its resources as specified by the :ref:`NodePath<class_NodePath>`'s subname (e.g. ``Area2D/CollisionShape2D:shape``). If several nested resources are specified in the :ref:`NodePath<class_NodePath>`, the last one will be fetched.
- The return value is an array of size 3: the first index points to the **Node** (or ``null`` if not found), the second index points to the :ref:`Resource<class_Resource>` (or ``null`` if not found), and the third index is the remaining :ref:`NodePath<class_NodePath>`, if any.
- For example, assuming that ``Area2D/CollisionShape2D`` is a valid node and that its ``shape`` property has been assigned a :ref:`RectangleShape2D<class_RectangleShape2D>` resource, one could have this kind of output:
- .. tabs::
- .. code-tab:: gdscript
- print(get_node_and_resource("Area2D/CollisionShape2D")) # [[CollisionShape2D:1161], Null, ]
- print(get_node_and_resource("Area2D/CollisionShape2D:shape")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], ]
- print(get_node_and_resource("Area2D/CollisionShape2D:shape:extents")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]
- .. code-tab:: csharp
- GD.Print(GetNodeAndResource("Area2D/CollisionShape2D")); // [[CollisionShape2D:1161], Null, ]
- GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], ]
- GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape:extents")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_node_or_null:
- .. rst-class:: classref-method
- :ref:`Node<class_Node>` **get_node_or_null** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
- Similar to :ref:`get_node<class_Node_method_get_node>`, but does not log an error if ``path`` does not point to a valid **Node**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_parent:
- .. rst-class:: classref-method
- :ref:`Node<class_Node>` **get_parent** **(** **)** |const|
- Returns the parent node of the current node, or ``null`` if the node lacks a parent.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_path:
- .. rst-class:: classref-method
- :ref:`NodePath<class_NodePath>` **get_path** **(** **)** |const|
- Returns the absolute path of the current node. This only works if the current node is inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_path_to:
- .. rst-class:: classref-method
- :ref:`NodePath<class_NodePath>` **get_path_to** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` use_unique_path=false **)** |const|
- Returns the relative :ref:`NodePath<class_NodePath>` from this node to the specified ``node``. Both nodes must be in the same scene or the function will fail.
- If ``use_unique_path`` is ``true``, returns the shortest path considering unique node.
- \ **Note:** If you get a relative path which starts from a unique node, the path may be longer than a normal relative path due to the addition of the unique node's name.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_physics_process_delta_time:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **get_physics_process_delta_time** **(** **)** |const|
- Returns the time elapsed (in seconds) since the last physics-bound frame (see :ref:`_physics_process<class_Node_private_method__physics_process>`). This is always a constant value in physics processing unless the frames per second is changed via :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_process_delta_time:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **get_process_delta_time** **(** **)** |const|
- Returns the time elapsed (in seconds) since the last process callback. This value may vary from frame to frame.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_scene_instance_load_placeholder:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **get_scene_instance_load_placeholder** **(** **)** |const|
- Returns ``true`` if this is an instance load placeholder. See :ref:`InstancePlaceholder<class_InstancePlaceholder>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_tree:
- .. rst-class:: classref-method
- :ref:`SceneTree<class_SceneTree>` **get_tree** **(** **)** |const|
- Returns the :ref:`SceneTree<class_SceneTree>` that contains this node. Returns ``null`` and prints an error if this node is not inside the scene tree. See also :ref:`is_inside_tree<class_Node_method_is_inside_tree>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_tree_string:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_tree_string** **(** **)**
- Returns the tree as a :ref:`String<class_String>`. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the :ref:`get_node<class_Node_method_get_node>` function. It also can be used in game UI/UX.
- \ **Example output:**\
- ::
- TheGame
- TheGame/Menu
- TheGame/Menu/Label
- TheGame/Menu/Camera2D
- TheGame/SplashScreen
- TheGame/SplashScreen/Camera2D
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_tree_string_pretty:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_tree_string_pretty** **(** **)**
- Similar to :ref:`get_tree_string<class_Node_method_get_tree_string>`, this returns the tree as a :ref:`String<class_String>`. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees.
- \ **Example output:**\
- ::
- ┖╴TheGame
- ┠╴Menu
- ┃ ┠╴Label
- ┃ ┖╴Camera2D
- ┖╴SplashScreen
- ┖╴Camera2D
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_viewport:
- .. rst-class:: classref-method
- :ref:`Viewport<class_Viewport>` **get_viewport** **(** **)** |const|
- Returns the node's :ref:`Viewport<class_Viewport>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_get_window:
- .. rst-class:: classref-method
- :ref:`Window<class_Window>` **get_window** **(** **)** |const|
- Returns the :ref:`Window<class_Window>` that contains this node. If the node is in the main window, this is equivalent to getting the root node (``get_tree().get_root()``).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_has_node:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_node** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
- Returns ``true`` if the node that the :ref:`NodePath<class_NodePath>` points to exists.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_has_node_and_resource:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_node_and_resource** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
- Returns ``true`` if the :ref:`NodePath<class_NodePath>` points to a valid node and its subname points to a valid resource, e.g. ``Area2D/CollisionShape2D:shape``. Properties with a non-:ref:`Resource<class_Resource>` type (e.g. nodes or primitive math types) are not considered resources.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_ancestor_of:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_ancestor_of** **(** :ref:`Node<class_Node>` node **)** |const|
- Returns ``true`` if the given node is a direct or indirect child of the current node.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_displayed_folded:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_displayed_folded** **(** **)** |const|
- Returns ``true`` if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_editable_instance:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_editable_instance** **(** :ref:`Node<class_Node>` node **)** |const|
- Returns ``true`` if ``node`` has editable children enabled relative to this node. This method is only intended for use with editor tooling.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_greater_than:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_greater_than** **(** :ref:`Node<class_Node>` node **)** |const|
- Returns ``true`` if the given node occurs later in the scene hierarchy than the current node.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_in_group:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_in_group** **(** :ref:`StringName<class_StringName>` group **)** |const|
- Returns ``true`` if this node is in the specified group. See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_inside_tree:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_inside_tree** **(** **)** |const|
- Returns ``true`` if this node is currently inside a :ref:`SceneTree<class_SceneTree>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_multiplayer_authority:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_multiplayer_authority** **(** **)** |const|
- Returns ``true`` if the local system is the multiplayer authority of this node.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_node_ready:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_node_ready** **(** **)** |const|
- Returns ``true`` if the node is ready, i.e. it's inside scene tree and all its children are initialized.
- \ :ref:`request_ready<class_Node_method_request_ready>` resets it back to ``false``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_physics_processing:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_physics_processing** **(** **)** |const|
- Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process<class_Node_method_set_physics_process>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_physics_processing_internal:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_physics_processing_internal** **(** **)** |const|
- Returns ``true`` if internal physics processing is enabled (see :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_processing:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_processing** **(** **)** |const|
- Returns ``true`` if processing is enabled (see :ref:`set_process<class_Node_method_set_process>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_processing_input:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_processing_input** **(** **)** |const|
- Returns ``true`` if the node is processing input (see :ref:`set_process_input<class_Node_method_set_process_input>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_processing_internal:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_processing_internal** **(** **)** |const|
- Returns ``true`` if internal processing is enabled (see :ref:`set_process_internal<class_Node_method_set_process_internal>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_processing_shortcut_input:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_processing_shortcut_input** **(** **)** |const|
- Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_processing_unhandled_input:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_processing_unhandled_input** **(** **)** |const|
- Returns ``true`` if the node is processing unhandled input (see :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_is_processing_unhandled_key_input:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_processing_unhandled_key_input** **(** **)** |const|
- Returns ``true`` if the node is processing unhandled key input (see :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_move_child:
- .. rst-class:: classref-method
- void **move_child** **(** :ref:`Node<class_Node>` child_node, :ref:`int<class_int>` to_index **)**
- Moves a child node to a different index (order) among the other children. Since calls, signals, etc. are performed by tree order, changing the order of children nodes may be useful. If ``to_index`` is negative, the index will be counted from the end.
- \ **Note:** Internal children can only be moved within their expected "internal range" (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_notify_deferred_thread_group:
- .. rst-class:: classref-method
- void **notify_deferred_thread_group** **(** :ref:`int<class_int>` what **)**
- Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`, but for notifications.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_notify_thread_safe:
- .. rst-class:: classref-method
- void **notify_thread_safe** **(** :ref:`int<class_int>` what **)**
- Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for notifications.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_print_orphan_nodes:
- .. rst-class:: classref-method
- void **print_orphan_nodes** **(** **)** |static|
- Prints all orphan nodes (nodes outside the :ref:`SceneTree<class_SceneTree>`). Used for debugging.
- \ **Note:** :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>` only works in debug builds. When called in a project exported in release mode, :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>` will not print anything.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_print_tree:
- .. rst-class:: classref-method
- void **print_tree** **(** **)**
- Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the :ref:`get_node<class_Node_method_get_node>` function.
- \ **Example output:**\
- ::
- TheGame
- TheGame/Menu
- TheGame/Menu/Label
- TheGame/Menu/Camera2D
- TheGame/SplashScreen
- TheGame/SplashScreen/Camera2D
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_print_tree_pretty:
- .. rst-class:: classref-method
- void **print_tree_pretty** **(** **)**
- Similar to :ref:`print_tree<class_Node_method_print_tree>`, this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees.
- \ **Example output:**\
- ::
- ┖╴TheGame
- ┠╴Menu
- ┃ ┠╴Label
- ┃ ┖╴Camera2D
- ┖╴SplashScreen
- ┖╴Camera2D
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_propagate_call:
- .. rst-class:: classref-method
- void **propagate_call** **(** :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` args=[], :ref:`bool<class_bool>` parent_first=false **)**
- Calls the given method (if present) with the arguments given in ``args`` on this node and recursively on all its children. If the ``parent_first`` argument is ``true``, the method will be called on the current node first, then on all its children. If ``parent_first`` is ``false``, the children will be called first.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_propagate_notification:
- .. rst-class:: classref-method
- void **propagate_notification** **(** :ref:`int<class_int>` what **)**
- Notifies the current node and all its children recursively by calling :ref:`Object.notification<class_Object_method_notification>` on all of them.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_queue_free:
- .. rst-class:: classref-method
- void **queue_free** **(** **)**
- Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well, and all references to the node and its children will become invalid, see :ref:`Object.free<class_Object_method_free>`.
- It is safe to call :ref:`queue_free<class_Node_method_queue_free>` multiple times per frame on a node, and to :ref:`Object.free<class_Object_method_free>` a node that is currently queued for deletion. Use :ref:`Object.is_queued_for_deletion<class_Object_method_is_queued_for_deletion>` to check whether a node will be deleted at the end of the frame.
- The node will only be freed after all other deferred calls are finished, so using :ref:`queue_free<class_Node_method_queue_free>` is not always the same as calling :ref:`Object.free<class_Object_method_free>` through :ref:`Object.call_deferred<class_Object_method_call_deferred>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_remove_child:
- .. rst-class:: classref-method
- void **remove_child** **(** :ref:`Node<class_Node>` node **)**
- Removes a child node. The node is NOT deleted and must be deleted manually.
- \ **Note:** This function may set the :ref:`owner<class_Node_property_owner>` of the removed Node (or its descendants) to be ``null``, if that :ref:`owner<class_Node_property_owner>` is no longer a parent or ancestor.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_remove_from_group:
- .. rst-class:: classref-method
- void **remove_from_group** **(** :ref:`StringName<class_StringName>` group **)**
- Removes a node from the ``group``. Does nothing if the node is not in the ``group``. See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_reparent:
- .. rst-class:: classref-method
- void **reparent** **(** :ref:`Node<class_Node>` new_parent, :ref:`bool<class_bool>` keep_global_transform=true **)**
- Changes the parent of this **Node** to the ``new_parent``. The node needs to already have a parent.
- If ``keep_global_transform`` is ``true``, the node's global transform will be preserved if supported. :ref:`Node2D<class_Node2D>`, :ref:`Node3D<class_Node3D>` and :ref:`Control<class_Control>` support this argument (but :ref:`Control<class_Control>` keeps only position).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_replace_by:
- .. rst-class:: classref-method
- void **replace_by** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` keep_groups=false **)**
- Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
- If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that the replaced node is in.
- \ **Note:** The given node will become the new parent of any child nodes that the replaced node had.
- \ **Note:** The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using :ref:`Object.free<class_Object_method_free>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_request_ready:
- .. rst-class:: classref-method
- void **request_ready** **(** **)**
- Requests that :ref:`_ready<class_Node_private_method__ready>` be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again. :ref:`_ready<class_Node_private_method__ready>` is called only for the node which requested it, which means that you need to request ready for each child if you want them to call :ref:`_ready<class_Node_private_method__ready>` too (in which case, :ref:`_ready<class_Node_private_method__ready>` will be called in the same order as it would normally).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_rpc:
- .. rst-class:: classref-method
- :ref:`Error<enum_@GlobalScope_Error>` **rpc** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg|
- Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath<class_NodePath>`, including the exact same node name. Behavior depends on the RPC configuration for the given method, see :ref:`rpc_config<class_Node_method_rpc_config>` and :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>`. Methods are not exposed to RPCs by default. Returns ``null``.
- \ **Note:** You can only safely use RPCs on clients after you received the ``connected_to_server`` signal from the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. You also need to keep track of the connection state, either by the :ref:`MultiplayerAPI<class_MultiplayerAPI>` signals like ``server_disconnected`` or by checking ``get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_rpc_config:
- .. rst-class:: classref-method
- void **rpc_config** **(** :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` config **)**
- Changes the RPC mode for the given ``method`` with the given ``config`` which should be ``null`` (to disable) or a :ref:`Dictionary<class_Dictionary>` in the form:
- ::
- {
- rpc_mode = MultiplayerAPI.RPCMode,
- transfer_mode = MultiplayerPeer.TransferMode,
- call_local = false,
- channel = 0,
- }
- See :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>` and :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`. An alternative is annotating methods and properties with the corresponding :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>` annotation (``@rpc("any_peer")``, ``@rpc("authority")``). By default, methods are not exposed to networking (and RPCs).
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_rpc_id:
- .. rst-class:: classref-method
- :ref:`Error<enum_@GlobalScope_Error>` **rpc_id** **(** :ref:`int<class_int>` peer_id, :ref:`StringName<class_StringName>` method, ... **)** |vararg|
- Sends a :ref:`rpc<class_Node_method_rpc>` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer<class_MultiplayerPeer_method_set_target_peer>`). Returns ``null``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_deferred_thread_group:
- .. rst-class:: classref-method
- void **set_deferred_thread_group** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)**
- Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`, but for setting properties.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_display_folded:
- .. rst-class:: classref-method
- void **set_display_folded** **(** :ref:`bool<class_bool>` fold **)**
- Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_editable_instance:
- .. rst-class:: classref-method
- void **set_editable_instance** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` is_editable **)**
- Sets the editable children state of ``node`` relative to this node. This method is only intended for use with editor tooling.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_multiplayer_authority:
- .. rst-class:: classref-method
- void **set_multiplayer_authority** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` recursive=true **)**
- Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with :ref:`rpc_config<class_Node_method_rpc_config>` and the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. Defaults to peer ID 1 (the server). If ``recursive``, the given peer is recursively set as the authority for all children of this node.
- \ **Warning:** This does **not** automatically replicate the new authority to other peers. It is developer's responsibility to do so. You can propagate the information about the new authority using :ref:`MultiplayerSpawner.spawn_function<class_MultiplayerSpawner_property_spawn_function>`, an RPC, or using a :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`. Also, the parent's authority does **not** propagate to newly added children.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_physics_process:
- .. rst-class:: classref-method
- void **set_physics_process** **(** :ref:`bool<class_bool>` enable **)**
- Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` at a fixed (usually 60 FPS, see :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` to change) interval (and the :ref:`_physics_process<class_Node_private_method__physics_process>` callback will be called if exists). Enabled automatically if :ref:`_physics_process<class_Node_private_method__physics_process>` is overridden. Any calls to this before :ref:`_ready<class_Node_private_method__ready>` will be ignored.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_physics_process_internal:
- .. rst-class:: classref-method
- void **set_physics_process_internal** **(** :ref:`bool<class_bool>` enable **)**
- Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process<class_Node_private_method__physics_process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process<class_Node_method_set_physics_process>`). Only useful for advanced uses to manipulate built-in nodes' behavior.
- \ **Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_process:
- .. rst-class:: classref-method
- void **set_process** **(** :ref:`bool<class_bool>` enable **)**
- Enables or disables processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` on every drawn frame (and the :ref:`_process<class_Node_private_method__process>` callback will be called if exists). Enabled automatically if :ref:`_process<class_Node_private_method__process>` is overridden. Any calls to this before :ref:`_ready<class_Node_private_method__ready>` will be ignored.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_process_input:
- .. rst-class:: classref-method
- void **set_process_input** **(** :ref:`bool<class_bool>` enable **)**
- Enables or disables input processing. This is not required for GUI controls! Enabled automatically if :ref:`_input<class_Node_private_method__input>` is overridden. Any calls to this before :ref:`_ready<class_Node_private_method__ready>` will be ignored.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_process_internal:
- .. rst-class:: classref-method
- void **set_process_internal** **(** :ref:`bool<class_bool>` enable **)**
- Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process<class_Node_private_method__process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process<class_Node_method_set_process>`). Only useful for advanced uses to manipulate built-in nodes' behavior.
- \ **Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_process_shortcut_input:
- .. rst-class:: classref-method
- void **set_process_shortcut_input** **(** :ref:`bool<class_bool>` enable **)**
- Enables shortcut processing. Enabled automatically if :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` is overridden. Any calls to this before :ref:`_ready<class_Node_private_method__ready>` will be ignored.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_process_unhandled_input:
- .. rst-class:: classref-method
- void **set_process_unhandled_input** **(** :ref:`bool<class_bool>` enable **)**
- Enables unhandled input processing. This is not required for GUI controls! It enables the node to receive all input that was not previously handled (usually by a :ref:`Control<class_Control>`). Enabled automatically if :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` is overridden. Any calls to this before :ref:`_ready<class_Node_private_method__ready>` will be ignored.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_process_unhandled_key_input:
- .. rst-class:: classref-method
- void **set_process_unhandled_key_input** **(** :ref:`bool<class_bool>` enable **)**
- Enables unhandled key input processing. Enabled automatically if :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` is overridden. Any calls to this before :ref:`_ready<class_Node_private_method__ready>` will be ignored.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_scene_instance_load_placeholder:
- .. rst-class:: classref-method
- void **set_scene_instance_load_placeholder** **(** :ref:`bool<class_bool>` load_placeholder **)**
- Sets whether this is an instance load placeholder. See :ref:`InstancePlaceholder<class_InstancePlaceholder>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_set_thread_safe:
- .. rst-class:: classref-method
- void **set_thread_safe** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)**
- Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for setting properties.
- .. rst-class:: classref-item-separator
- ----
- .. _class_Node_method_update_configuration_warnings:
- .. rst-class:: classref-method
- void **update_configuration_warnings** **(** **)**
- Updates the warning displayed for this node in the Scene Dock.
- Use :ref:`_get_configuration_warnings<class_Node_private_method__get_configuration_warnings>` to setup the warning message to display.
- .. |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.)`
|