class_node.rst 192 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.3/doc/classes/Node.xml.
  6. .. _class_Node:
  7. Node
  8. ====
  9. **Inherits:** :ref:`Object<class_Object>`
  10. **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:`StatusIndicator<class_StatusIndicator>`, :ref:`Timer<class_Timer>`, :ref:`Viewport<class_Viewport>`, :ref:`WorldEnvironment<class_WorldEnvironment>`
  11. Base class for all scene objects.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. 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.
  16. 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.
  17. \ **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.
  18. 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.
  19. 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).
  20. \ **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.
  21. 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.
  22. To keep track of the scene hierarchy (especially when instantiating 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.
  23. 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.
  24. \ **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>`.
  25. \ **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.
  26. \ **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 (see :ref:`Object.set_script<class_Object_method_set_script>` and :ref:`Object.get_script<class_Object_method_get_script>`).
  27. .. rst-class:: classref-introduction-group
  28. Tutorials
  29. ---------
  30. - :doc:`Nodes and scenes <../getting_started/step_by_step/nodes_and_scenes>`
  31. - `All Demos <https://github.com/godotengine/godot-demo-projects/>`__
  32. .. rst-class:: classref-reftable-group
  33. Properties
  34. ----------
  35. .. table::
  36. :widths: auto
  37. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  38. | :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` | ``0`` |
  39. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  40. | :ref:`String<class_String>` | :ref:`editor_description<class_Node_property_editor_description>` | ``""`` |
  41. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  42. | :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`multiplayer<class_Node_property_multiplayer>` | |
  43. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  44. | :ref:`StringName<class_StringName>` | :ref:`name<class_Node_property_name>` | |
  45. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  46. | :ref:`Node<class_Node>` | :ref:`owner<class_Node_property_owner>` | |
  47. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  48. | :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` | :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>` | ``0`` |
  49. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  50. | :ref:`ProcessMode<enum_Node_ProcessMode>` | :ref:`process_mode<class_Node_property_process_mode>` | ``0`` |
  51. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  52. | :ref:`int<class_int>` | :ref:`process_physics_priority<class_Node_property_process_physics_priority>` | ``0`` |
  53. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  54. | :ref:`int<class_int>` | :ref:`process_priority<class_Node_property_process_priority>` | ``0`` |
  55. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  56. | :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` | :ref:`process_thread_group<class_Node_property_process_thread_group>` | ``0`` |
  57. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  58. | :ref:`int<class_int>` | :ref:`process_thread_group_order<class_Node_property_process_thread_group_order>` | |
  59. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  60. | |bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\] | :ref:`process_thread_messages<class_Node_property_process_thread_messages>` | |
  61. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  62. | :ref:`String<class_String>` | :ref:`scene_file_path<class_Node_property_scene_file_path>` | |
  63. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  64. | :ref:`bool<class_bool>` | :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>` | ``false`` |
  65. +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+
  66. .. rst-class:: classref-reftable-group
  67. Methods
  68. -------
  69. .. table::
  70. :widths: auto
  71. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | |void| | :ref:`_enter_tree<class_Node_private_method__enter_tree>`\ (\ ) |virtual| |
  73. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | |void| | :ref:`_exit_tree<class_Node_private_method__exit_tree>`\ (\ ) |virtual| |
  75. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_configuration_warnings<class_Node_private_method__get_configuration_warnings>`\ (\ ) |virtual| |const| |
  77. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | |void| | :ref:`_input<class_Node_private_method__input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
  79. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | |void| | :ref:`_physics_process<class_Node_private_method__physics_process>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| |
  81. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | |void| | :ref:`_process<class_Node_private_method__process>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| |
  83. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | |void| | :ref:`_ready<class_Node_private_method__ready>`\ (\ ) |virtual| |
  85. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | |void| | :ref:`_shortcut_input<class_Node_private_method__shortcut_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
  87. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | |void| | :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
  89. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | |void| | :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
  91. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | |void| | :ref:`add_child<class_Node_method_add_child>`\ (\ node\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false, internal\: :ref:`InternalMode<enum_Node_InternalMode>` = 0\ ) |
  93. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | |void| | :ref:`add_sibling<class_Node_method_add_sibling>`\ (\ sibling\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false\ ) |
  95. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | |void| | :ref:`add_to_group<class_Node_method_add_to_group>`\ (\ group\: :ref:`StringName<class_StringName>`, persistent\: :ref:`bool<class_bool>` = false\ ) |
  97. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`String<class_String>` | :ref:`atr<class_Node_method_atr>`\ (\ message\: :ref:`String<class_String>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| |
  99. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`String<class_String>` | :ref:`atr_n<class_Node_method_atr_n>`\ (\ message\: :ref:`String<class_String>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| |
  101. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`Variant<class_Variant>` | :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| |
  103. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Variant<class_Variant>` | :ref:`call_thread_safe<class_Node_method_call_thread_safe>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| |
  105. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`bool<class_bool>` | :ref:`can_process<class_Node_method_can_process>`\ (\ ) |const| |
  107. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`Tween<class_Tween>` | :ref:`create_tween<class_Node_method_create_tween>`\ (\ ) |
  109. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`Node<class_Node>` | :ref:`duplicate<class_Node_method_duplicate>`\ (\ flags\: :ref:`int<class_int>` = 15\ ) |const| |
  111. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`Node<class_Node>` | :ref:`find_child<class_Node_method_find_child>`\ (\ pattern\: :ref:`String<class_String>`, recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| |
  113. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`find_children<class_Node_method_find_children>`\ (\ pattern\: :ref:`String<class_String>`, type\: :ref:`String<class_String>` = "", recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| |
  115. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`Node<class_Node>` | :ref:`find_parent<class_Node_method_find_parent>`\ (\ pattern\: :ref:`String<class_String>`\ ) |const| |
  117. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`Node<class_Node>` | :ref:`get_child<class_Node_method_get_child>`\ (\ idx\: :ref:`int<class_int>`, include_internal\: :ref:`bool<class_bool>` = false\ ) |const| |
  119. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`int<class_int>` | :ref:`get_child_count<class_Node_method_get_child_count>`\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| |
  121. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`get_children<class_Node_method_get_children>`\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| |
  123. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_groups<class_Node_method_get_groups>`\ (\ ) |const| |
  125. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`int<class_int>` | :ref:`get_index<class_Node_method_get_index>`\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| |
  127. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`Window<class_Window>` | :ref:`get_last_exclusive_window<class_Node_method_get_last_exclusive_window>`\ (\ ) |const| |
  129. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`get_multiplayer_authority<class_Node_method_get_multiplayer_authority>`\ (\ ) |const| |
  131. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`Node<class_Node>` | :ref:`get_node<class_Node_method_get_node>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| |
  133. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`Array<class_Array>` | :ref:`get_node_and_resource<class_Node_method_get_node_and_resource>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |
  135. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`Node<class_Node>` | :ref:`get_node_or_null<class_Node_method_get_node_or_null>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| |
  137. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`Node<class_Node>` | :ref:`get_parent<class_Node_method_get_parent>`\ (\ ) |const| |
  139. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`NodePath<class_NodePath>` | :ref:`get_path<class_Node_method_get_path>`\ (\ ) |const| |
  141. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`NodePath<class_NodePath>` | :ref:`get_path_to<class_Node_method_get_path_to>`\ (\ node\: :ref:`Node<class_Node>`, use_unique_path\: :ref:`bool<class_bool>` = false\ ) |const| |
  143. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`float<class_float>` | :ref:`get_physics_process_delta_time<class_Node_method_get_physics_process_delta_time>`\ (\ ) |const| |
  145. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`float<class_float>` | :ref:`get_process_delta_time<class_Node_method_get_process_delta_time>`\ (\ ) |const| |
  147. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`bool<class_bool>` | :ref:`get_scene_instance_load_placeholder<class_Node_method_get_scene_instance_load_placeholder>`\ (\ ) |const| |
  149. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`SceneTree<class_SceneTree>` | :ref:`get_tree<class_Node_method_get_tree>`\ (\ ) |const| |
  151. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`String<class_String>` | :ref:`get_tree_string<class_Node_method_get_tree_string>`\ (\ ) |
  153. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`String<class_String>` | :ref:`get_tree_string_pretty<class_Node_method_get_tree_string_pretty>`\ (\ ) |
  155. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`Viewport<class_Viewport>` | :ref:`get_viewport<class_Node_method_get_viewport>`\ (\ ) |const| |
  157. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | :ref:`Window<class_Window>` | :ref:`get_window<class_Node_method_get_window>`\ (\ ) |const| |
  159. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | :ref:`bool<class_bool>` | :ref:`has_node<class_Node_method_has_node>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| |
  161. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | :ref:`bool<class_bool>` | :ref:`has_node_and_resource<class_Node_method_has_node_and_resource>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| |
  163. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | :ref:`bool<class_bool>` | :ref:`is_ancestor_of<class_Node_method_is_ancestor_of>`\ (\ node\: :ref:`Node<class_Node>`\ ) |const| |
  165. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | :ref:`bool<class_bool>` | :ref:`is_displayed_folded<class_Node_method_is_displayed_folded>`\ (\ ) |const| |
  167. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | :ref:`bool<class_bool>` | :ref:`is_editable_instance<class_Node_method_is_editable_instance>`\ (\ node\: :ref:`Node<class_Node>`\ ) |const| |
  169. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | :ref:`bool<class_bool>` | :ref:`is_greater_than<class_Node_method_is_greater_than>`\ (\ node\: :ref:`Node<class_Node>`\ ) |const| |
  171. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | :ref:`bool<class_bool>` | :ref:`is_in_group<class_Node_method_is_in_group>`\ (\ group\: :ref:`StringName<class_StringName>`\ ) |const| |
  173. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | :ref:`bool<class_bool>` | :ref:`is_inside_tree<class_Node_method_is_inside_tree>`\ (\ ) |const| |
  175. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | :ref:`bool<class_bool>` | :ref:`is_multiplayer_authority<class_Node_method_is_multiplayer_authority>`\ (\ ) |const| |
  177. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | :ref:`bool<class_bool>` | :ref:`is_node_ready<class_Node_method_is_node_ready>`\ (\ ) |const| |
  179. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`is_part_of_edited_scene<class_Node_method_is_part_of_edited_scene>`\ (\ ) |const| |
  181. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`bool<class_bool>` | :ref:`is_physics_interpolated<class_Node_method_is_physics_interpolated>`\ (\ ) |const| |
  183. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`bool<class_bool>` | :ref:`is_physics_interpolated_and_enabled<class_Node_method_is_physics_interpolated_and_enabled>`\ (\ ) |const| |
  185. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`bool<class_bool>` | :ref:`is_physics_processing<class_Node_method_is_physics_processing>`\ (\ ) |const| |
  187. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :ref:`bool<class_bool>` | :ref:`is_physics_processing_internal<class_Node_method_is_physics_processing_internal>`\ (\ ) |const| |
  189. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | :ref:`bool<class_bool>` | :ref:`is_processing<class_Node_method_is_processing>`\ (\ ) |const| |
  191. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | :ref:`bool<class_bool>` | :ref:`is_processing_input<class_Node_method_is_processing_input>`\ (\ ) |const| |
  193. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | :ref:`bool<class_bool>` | :ref:`is_processing_internal<class_Node_method_is_processing_internal>`\ (\ ) |const| |
  195. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | :ref:`bool<class_bool>` | :ref:`is_processing_shortcut_input<class_Node_method_is_processing_shortcut_input>`\ (\ ) |const| |
  197. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_input<class_Node_method_is_processing_unhandled_input>`\ (\ ) |const| |
  199. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_key_input<class_Node_method_is_processing_unhandled_key_input>`\ (\ ) |const| |
  201. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | |void| | :ref:`move_child<class_Node_method_move_child>`\ (\ child_node\: :ref:`Node<class_Node>`, to_index\: :ref:`int<class_int>`\ ) |
  203. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | |void| | :ref:`notify_deferred_thread_group<class_Node_method_notify_deferred_thread_group>`\ (\ what\: :ref:`int<class_int>`\ ) |
  205. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | |void| | :ref:`notify_thread_safe<class_Node_method_notify_thread_safe>`\ (\ what\: :ref:`int<class_int>`\ ) |
  207. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | |void| | :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>`\ (\ ) |static| |
  209. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | |void| | :ref:`print_tree<class_Node_method_print_tree>`\ (\ ) |
  211. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | |void| | :ref:`print_tree_pretty<class_Node_method_print_tree_pretty>`\ (\ ) |
  213. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | |void| | :ref:`propagate_call<class_Node_method_propagate_call>`\ (\ method\: :ref:`StringName<class_StringName>`, args\: :ref:`Array<class_Array>` = [], parent_first\: :ref:`bool<class_bool>` = false\ ) |
  215. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | |void| | :ref:`propagate_notification<class_Node_method_propagate_notification>`\ (\ what\: :ref:`int<class_int>`\ ) |
  217. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | |void| | :ref:`queue_free<class_Node_method_queue_free>`\ (\ ) |
  219. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | |void| | :ref:`remove_child<class_Node_method_remove_child>`\ (\ node\: :ref:`Node<class_Node>`\ ) |
  221. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | |void| | :ref:`remove_from_group<class_Node_method_remove_from_group>`\ (\ group\: :ref:`StringName<class_StringName>`\ ) |
  223. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | |void| | :ref:`reparent<class_Node_method_reparent>`\ (\ new_parent\: :ref:`Node<class_Node>`, keep_global_transform\: :ref:`bool<class_bool>` = true\ ) |
  225. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | |void| | :ref:`replace_by<class_Node_method_replace_by>`\ (\ node\: :ref:`Node<class_Node>`, keep_groups\: :ref:`bool<class_bool>` = false\ ) |
  227. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | |void| | :ref:`request_ready<class_Node_method_request_ready>`\ (\ ) |
  229. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | |void| | :ref:`reset_physics_interpolation<class_Node_method_reset_physics_interpolation>`\ (\ ) |
  231. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc<class_Node_method_rpc>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| |
  233. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | |void| | :ref:`rpc_config<class_Node_method_rpc_config>`\ (\ method\: :ref:`StringName<class_StringName>`, config\: :ref:`Variant<class_Variant>`\ ) |
  235. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc_id<class_Node_method_rpc_id>`\ (\ peer_id\: :ref:`int<class_int>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| |
  237. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | |void| | :ref:`set_deferred_thread_group<class_Node_method_set_deferred_thread_group>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |
  239. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | |void| | :ref:`set_display_folded<class_Node_method_set_display_folded>`\ (\ fold\: :ref:`bool<class_bool>`\ ) |
  241. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | |void| | :ref:`set_editable_instance<class_Node_method_set_editable_instance>`\ (\ node\: :ref:`Node<class_Node>`, is_editable\: :ref:`bool<class_bool>`\ ) |
  243. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | |void| | :ref:`set_multiplayer_authority<class_Node_method_set_multiplayer_authority>`\ (\ id\: :ref:`int<class_int>`, recursive\: :ref:`bool<class_bool>` = true\ ) |
  245. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | |void| | :ref:`set_physics_process<class_Node_method_set_physics_process>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  247. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | |void| | :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  249. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | |void| | :ref:`set_process<class_Node_method_set_process>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  251. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | |void| | :ref:`set_process_input<class_Node_method_set_process_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  253. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | |void| | :ref:`set_process_internal<class_Node_method_set_process_internal>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  255. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | |void| | :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  257. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | |void| | :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  259. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | |void| | :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  261. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | |void| | :ref:`set_scene_instance_load_placeholder<class_Node_method_set_scene_instance_load_placeholder>`\ (\ load_placeholder\: :ref:`bool<class_bool>`\ ) |
  263. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | |void| | :ref:`set_thread_safe<class_Node_method_set_thread_safe>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |
  265. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | |void| | :ref:`update_configuration_warnings<class_Node_method_update_configuration_warnings>`\ (\ ) |
  267. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. .. rst-class:: classref-section-separator
  269. ----
  270. .. rst-class:: classref-descriptions-group
  271. Signals
  272. -------
  273. .. _class_Node_signal_child_entered_tree:
  274. .. rst-class:: classref-signal
  275. **child_entered_tree**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_Node_signal_child_entered_tree>`
  276. Emitted when the child ``node`` enters the :ref:`SceneTree<class_SceneTree>`, usually because this node entered the tree (see :ref:`tree_entered<class_Node_signal_tree_entered>`), or :ref:`add_child<class_Node_method_add_child>` has been called.
  277. 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>`.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _class_Node_signal_child_exiting_tree:
  281. .. rst-class:: classref-signal
  282. **child_exiting_tree**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_Node_signal_child_exiting_tree>`
  283. Emitted when the child ``node`` is about to exit the :ref:`SceneTree<class_SceneTree>`, usually because this node is exiting the tree (see :ref:`tree_exiting<class_Node_signal_tree_exiting>`), or because the child ``node`` is being removed or freed.
  284. When this signal is received, the child ``node`` is still accessible inside the tree. 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>`.
  285. .. rst-class:: classref-item-separator
  286. ----
  287. .. _class_Node_signal_child_order_changed:
  288. .. rst-class:: classref-signal
  289. **child_order_changed**\ (\ ) :ref:`๐Ÿ”—<class_Node_signal_child_order_changed>`
  290. Emitted when the list of children is changed. This happens when child nodes are added, moved or removed.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_Node_signal_editor_description_changed:
  294. .. rst-class:: classref-signal
  295. **editor_description_changed**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_Node_signal_editor_description_changed>`
  296. Emitted when the node's editor description field changed.
  297. .. rst-class:: classref-item-separator
  298. ----
  299. .. _class_Node_signal_ready:
  300. .. rst-class:: classref-signal
  301. **ready**\ (\ ) :ref:`๐Ÿ”—<class_Node_signal_ready>`
  302. Emitted when the node is considered ready, after :ref:`_ready<class_Node_private_method__ready>` is called.
  303. .. rst-class:: classref-item-separator
  304. ----
  305. .. _class_Node_signal_renamed:
  306. .. rst-class:: classref-signal
  307. **renamed**\ (\ ) :ref:`๐Ÿ”—<class_Node_signal_renamed>`
  308. Emitted when the node's :ref:`name<class_Node_property_name>` is changed, if the node is inside the tree.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_Node_signal_replacing_by:
  312. .. rst-class:: classref-signal
  313. **replacing_by**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_Node_signal_replacing_by>`
  314. Emitted when this node is being replaced by the ``node``, see :ref:`replace_by<class_Node_method_replace_by>`.
  315. 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``.
  316. .. rst-class:: classref-item-separator
  317. ----
  318. .. _class_Node_signal_tree_entered:
  319. .. rst-class:: classref-signal
  320. **tree_entered**\ (\ ) :ref:`๐Ÿ”—<class_Node_signal_tree_entered>`
  321. Emitted when the node enters the tree.
  322. This signal is emitted *after* the related :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification.
  323. .. rst-class:: classref-item-separator
  324. ----
  325. .. _class_Node_signal_tree_exited:
  326. .. rst-class:: classref-signal
  327. **tree_exited**\ (\ ) :ref:`๐Ÿ”—<class_Node_signal_tree_exited>`
  328. Emitted after the node exits the tree and is no longer active.
  329. This signal is emitted *after* the related :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` notification.
  330. .. rst-class:: classref-item-separator
  331. ----
  332. .. _class_Node_signal_tree_exiting:
  333. .. rst-class:: classref-signal
  334. **tree_exiting**\ (\ ) :ref:`๐Ÿ”—<class_Node_signal_tree_exiting>`
  335. Emitted when the node is just about to exit the tree. The node is still valid. As such, this is the right place for de-initialization (or a "destructor", if you will).
  336. This signal is emitted *after* the node's :ref:`_exit_tree<class_Node_private_method__exit_tree>`, and *before* the related :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>`.
  337. .. rst-class:: classref-section-separator
  338. ----
  339. .. rst-class:: classref-descriptions-group
  340. Enumerations
  341. ------------
  342. .. _enum_Node_ProcessMode:
  343. .. rst-class:: classref-enumeration
  344. enum **ProcessMode**: :ref:`๐Ÿ”—<enum_Node_ProcessMode>`
  345. .. _class_Node_constant_PROCESS_MODE_INHERIT:
  346. .. rst-class:: classref-enumeration-constant
  347. :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_INHERIT** = ``0``
  348. Inherits :ref:`process_mode<class_Node_property_process_mode>` from the node's parent. This is the default for any newly created node.
  349. .. _class_Node_constant_PROCESS_MODE_PAUSABLE:
  350. .. rst-class:: classref-enumeration-constant
  351. :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_PAUSABLE** = ``1``
  352. Stops processing when :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``true``. This is the inverse of :ref:`PROCESS_MODE_WHEN_PAUSED<class_Node_constant_PROCESS_MODE_WHEN_PAUSED>`, and the default for the root node.
  353. .. _class_Node_constant_PROCESS_MODE_WHEN_PAUSED:
  354. .. rst-class:: classref-enumeration-constant
  355. :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_WHEN_PAUSED** = ``2``
  356. Process **only** when :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``true``. This is the inverse of :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`.
  357. .. _class_Node_constant_PROCESS_MODE_ALWAYS:
  358. .. rst-class:: classref-enumeration-constant
  359. :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_ALWAYS** = ``3``
  360. Always process. Keeps processing, ignoring :ref:`SceneTree.paused<class_SceneTree_property_paused>`. This is the inverse of :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
  361. .. _class_Node_constant_PROCESS_MODE_DISABLED:
  362. .. rst-class:: classref-enumeration-constant
  363. :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_DISABLED** = ``4``
  364. Never process. Completely disables processing, ignoring :ref:`SceneTree.paused<class_SceneTree_property_paused>`. This is the inverse of :ref:`PROCESS_MODE_ALWAYS<class_Node_constant_PROCESS_MODE_ALWAYS>`.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _enum_Node_ProcessThreadGroup:
  368. .. rst-class:: classref-enumeration
  369. enum **ProcessThreadGroup**: :ref:`๐Ÿ”—<enum_Node_ProcessThreadGroup>`
  370. .. _class_Node_constant_PROCESS_THREAD_GROUP_INHERIT:
  371. .. rst-class:: classref-enumeration-constant
  372. :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_INHERIT** = ``0``
  373. Process this node based on the thread group mode of the first 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.
  374. .. _class_Node_constant_PROCESS_THREAD_GROUP_MAIN_THREAD:
  375. .. rst-class:: classref-enumeration-constant
  376. :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_MAIN_THREAD** = ``1``
  377. Process this node (and child nodes set to inherit) on the main thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information.
  378. .. _class_Node_constant_PROCESS_THREAD_GROUP_SUB_THREAD:
  379. .. rst-class:: classref-enumeration-constant
  380. :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_SUB_THREAD** = ``2``
  381. Process this node (and child nodes set to inherit) on a sub-thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information.
  382. .. rst-class:: classref-item-separator
  383. ----
  384. .. _enum_Node_ProcessThreadMessages:
  385. .. rst-class:: classref-enumeration
  386. flags **ProcessThreadMessages**: :ref:`๐Ÿ”—<enum_Node_ProcessThreadMessages>`
  387. .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES:
  388. .. rst-class:: classref-enumeration-constant
  389. :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES** = ``1``
  390. Allows this node to process threaded messages created with :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` right before :ref:`_process<class_Node_private_method__process>` is called.
  391. .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_PHYSICS:
  392. .. rst-class:: classref-enumeration-constant
  393. :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES_PHYSICS** = ``2``
  394. Allows this node to process threaded messages created with :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` right before :ref:`_physics_process<class_Node_private_method__physics_process>` is called.
  395. .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_ALL:
  396. .. rst-class:: classref-enumeration-constant
  397. :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES_ALL** = ``3``
  398. Allows this node to process threaded messages created with :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` right before either :ref:`_process<class_Node_private_method__process>` or :ref:`_physics_process<class_Node_private_method__physics_process>` are called.
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _enum_Node_PhysicsInterpolationMode:
  402. .. rst-class:: classref-enumeration
  403. enum **PhysicsInterpolationMode**: :ref:`๐Ÿ”—<enum_Node_PhysicsInterpolationMode>`
  404. .. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_INHERIT:
  405. .. rst-class:: classref-enumeration-constant
  406. :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **PHYSICS_INTERPOLATION_MODE_INHERIT** = ``0``
  407. Inherits :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>` from the node's parent. This is the default for any newly created node.
  408. .. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_ON:
  409. .. rst-class:: classref-enumeration-constant
  410. :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **PHYSICS_INTERPOLATION_MODE_ON** = ``1``
  411. Enables physics interpolation for this node and for children set to :ref:`PHYSICS_INTERPOLATION_MODE_INHERIT<class_Node_constant_PHYSICS_INTERPOLATION_MODE_INHERIT>`. This is the default for the root node.
  412. .. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_OFF:
  413. .. rst-class:: classref-enumeration-constant
  414. :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **PHYSICS_INTERPOLATION_MODE_OFF** = ``2``
  415. Disables physics interpolation for this node and for children set to :ref:`PHYSICS_INTERPOLATION_MODE_INHERIT<class_Node_constant_PHYSICS_INTERPOLATION_MODE_INHERIT>`.
  416. .. rst-class:: classref-item-separator
  417. ----
  418. .. _enum_Node_DuplicateFlags:
  419. .. rst-class:: classref-enumeration
  420. enum **DuplicateFlags**: :ref:`๐Ÿ”—<enum_Node_DuplicateFlags>`
  421. .. _class_Node_constant_DUPLICATE_SIGNALS:
  422. .. rst-class:: classref-enumeration-constant
  423. :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_SIGNALS** = ``1``
  424. Duplicate the node's signal connections.
  425. .. _class_Node_constant_DUPLICATE_GROUPS:
  426. .. rst-class:: classref-enumeration-constant
  427. :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_GROUPS** = ``2``
  428. Duplicate the node's groups.
  429. .. _class_Node_constant_DUPLICATE_SCRIPTS:
  430. .. rst-class:: classref-enumeration-constant
  431. :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_SCRIPTS** = ``4``
  432. Duplicate the node's script (also overriding the duplicated children's scripts, if combined with :ref:`DUPLICATE_USE_INSTANTIATION<class_Node_constant_DUPLICATE_USE_INSTANTIATION>`).
  433. .. _class_Node_constant_DUPLICATE_USE_INSTANTIATION:
  434. .. rst-class:: classref-enumeration-constant
  435. :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_USE_INSTANTIATION** = ``8``
  436. Duplicate using :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>`. If the node comes from a scene saved on disk, re-uses :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` as the base for the duplicated node and its children.
  437. .. rst-class:: classref-item-separator
  438. ----
  439. .. _enum_Node_InternalMode:
  440. .. rst-class:: classref-enumeration
  441. enum **InternalMode**: :ref:`๐Ÿ”—<enum_Node_InternalMode>`
  442. .. _class_Node_constant_INTERNAL_MODE_DISABLED:
  443. .. rst-class:: classref-enumeration-constant
  444. :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_DISABLED** = ``0``
  445. The node will not be internal.
  446. .. _class_Node_constant_INTERNAL_MODE_FRONT:
  447. .. rst-class:: classref-enumeration-constant
  448. :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_FRONT** = ``1``
  449. The node will be placed at the beginning of the parent's children, before any non-internal sibling.
  450. .. _class_Node_constant_INTERNAL_MODE_BACK:
  451. .. rst-class:: classref-enumeration-constant
  452. :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_BACK** = ``2``
  453. The node will be placed at the end of the parent's children, after any non-internal sibling.
  454. .. rst-class:: classref-item-separator
  455. ----
  456. .. _enum_Node_AutoTranslateMode:
  457. .. rst-class:: classref-enumeration
  458. enum **AutoTranslateMode**: :ref:`๐Ÿ”—<enum_Node_AutoTranslateMode>`
  459. .. _class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT:
  460. .. rst-class:: classref-enumeration-constant
  461. :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **AUTO_TRANSLATE_MODE_INHERIT** = ``0``
  462. Inherits :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` from the node's parent. This is the default for any newly created node.
  463. .. _class_Node_constant_AUTO_TRANSLATE_MODE_ALWAYS:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **AUTO_TRANSLATE_MODE_ALWAYS** = ``1``
  466. Always automatically translate. This is the inverse of :ref:`AUTO_TRANSLATE_MODE_DISABLED<class_Node_constant_AUTO_TRANSLATE_MODE_DISABLED>`, and the default for the root node.
  467. .. _class_Node_constant_AUTO_TRANSLATE_MODE_DISABLED:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **AUTO_TRANSLATE_MODE_DISABLED** = ``2``
  470. Never automatically translate. This is the inverse of :ref:`AUTO_TRANSLATE_MODE_ALWAYS<class_Node_constant_AUTO_TRANSLATE_MODE_ALWAYS>`.
  471. String parsing for POT generation will be skipped for this node and children that are set to :ref:`AUTO_TRANSLATE_MODE_INHERIT<class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT>`.
  472. .. rst-class:: classref-section-separator
  473. ----
  474. .. rst-class:: classref-descriptions-group
  475. Constants
  476. ---------
  477. .. _class_Node_constant_NOTIFICATION_ENTER_TREE:
  478. .. rst-class:: classref-constant
  479. **NOTIFICATION_ENTER_TREE** = ``10`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_ENTER_TREE>`
  480. Notification received when the node enters a :ref:`SceneTree<class_SceneTree>`. See :ref:`_enter_tree<class_Node_private_method__enter_tree>`.
  481. This notification is received *before* the related :ref:`tree_entered<class_Node_signal_tree_entered>` signal.
  482. .. _class_Node_constant_NOTIFICATION_EXIT_TREE:
  483. .. rst-class:: classref-constant
  484. **NOTIFICATION_EXIT_TREE** = ``11`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_EXIT_TREE>`
  485. Notification received when the node is about to exit a :ref:`SceneTree<class_SceneTree>`. See :ref:`_exit_tree<class_Node_private_method__exit_tree>`.
  486. This notification is received *after* the related :ref:`tree_exiting<class_Node_signal_tree_exiting>` signal.
  487. .. _class_Node_constant_NOTIFICATION_MOVED_IN_PARENT:
  488. .. rst-class:: classref-constant
  489. **NOTIFICATION_MOVED_IN_PARENT** = ``12`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_MOVED_IN_PARENT>`
  490. **Deprecated:** This notification is no longer sent by the engine. Use :ref:`NOTIFICATION_CHILD_ORDER_CHANGED<class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED>` instead.
  491. .. _class_Node_constant_NOTIFICATION_READY:
  492. .. rst-class:: classref-constant
  493. **NOTIFICATION_READY** = ``13`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_READY>`
  494. Notification received when the node is ready. See :ref:`_ready<class_Node_private_method__ready>`.
  495. .. _class_Node_constant_NOTIFICATION_PAUSED:
  496. .. rst-class:: classref-constant
  497. **NOTIFICATION_PAUSED** = ``14`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_PAUSED>`
  498. Notification received when the node is paused. See :ref:`process_mode<class_Node_property_process_mode>`.
  499. .. _class_Node_constant_NOTIFICATION_UNPAUSED:
  500. .. rst-class:: classref-constant
  501. **NOTIFICATION_UNPAUSED** = ``15`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_UNPAUSED>`
  502. Notification received when the node is unpaused. See :ref:`process_mode<class_Node_property_process_mode>`.
  503. .. _class_Node_constant_NOTIFICATION_PHYSICS_PROCESS:
  504. .. rst-class:: classref-constant
  505. **NOTIFICATION_PHYSICS_PROCESS** = ``16`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`
  506. Notification received from the tree every physics frame when :ref:`is_physics_processing<class_Node_method_is_physics_processing>` returns ``true``. See :ref:`_physics_process<class_Node_private_method__physics_process>`.
  507. .. _class_Node_constant_NOTIFICATION_PROCESS:
  508. .. rst-class:: classref-constant
  509. **NOTIFICATION_PROCESS** = ``17`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_PROCESS>`
  510. Notification received from the tree every rendered frame when :ref:`is_processing<class_Node_method_is_processing>` returns ``true``. See :ref:`_process<class_Node_private_method__process>`.
  511. .. _class_Node_constant_NOTIFICATION_PARENTED:
  512. .. rst-class:: classref-constant
  513. **NOTIFICATION_PARENTED** = ``18`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_PARENTED>`
  514. Notification received when the node is set as a child of another node (see :ref:`add_child<class_Node_method_add_child>` and :ref:`add_sibling<class_Node_method_add_sibling>`).
  515. \ **Note:** This does *not* mean that the node entered the :ref:`SceneTree<class_SceneTree>`.
  516. .. _class_Node_constant_NOTIFICATION_UNPARENTED:
  517. .. rst-class:: classref-constant
  518. **NOTIFICATION_UNPARENTED** = ``19`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_UNPARENTED>`
  519. Notification received when the parent node calls :ref:`remove_child<class_Node_method_remove_child>` on this node.
  520. \ **Note:** This does *not* mean that the node exited the :ref:`SceneTree<class_SceneTree>`.
  521. .. _class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED:
  522. .. rst-class:: classref-constant
  523. **NOTIFICATION_SCENE_INSTANTIATED** = ``20`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED>`
  524. Notification received *only* by the newly instantiated scene root node, when :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` is completed.
  525. .. _class_Node_constant_NOTIFICATION_DRAG_BEGIN:
  526. .. rst-class:: classref-constant
  527. **NOTIFICATION_DRAG_BEGIN** = ``21`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_DRAG_BEGIN>`
  528. Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.
  529. 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>`.
  530. Use :ref:`Viewport.gui_get_drag_data<class_Viewport_method_gui_get_drag_data>` to get the dragged data.
  531. .. _class_Node_constant_NOTIFICATION_DRAG_END:
  532. .. rst-class:: classref-constant
  533. **NOTIFICATION_DRAG_END** = ``22`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_DRAG_END>`
  534. Notification received when a drag operation ends.
  535. Use :ref:`Viewport.gui_is_drag_successful<class_Viewport_method_gui_is_drag_successful>` to check if the drag succeeded.
  536. .. _class_Node_constant_NOTIFICATION_PATH_RENAMED:
  537. .. rst-class:: classref-constant
  538. **NOTIFICATION_PATH_RENAMED** = ``23`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_PATH_RENAMED>`
  539. Notification received when the node's :ref:`name<class_Node_property_name>` or one of its ancestors' :ref:`name<class_Node_property_name>` is changed. This notification is *not* received when the node is removed from the :ref:`SceneTree<class_SceneTree>`.
  540. .. _class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED:
  541. .. rst-class:: classref-constant
  542. **NOTIFICATION_CHILD_ORDER_CHANGED** = ``24`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED>`
  543. Notification received when the list of children is changed. This happens when child nodes are added, moved or removed.
  544. .. _class_Node_constant_NOTIFICATION_INTERNAL_PROCESS:
  545. .. rst-class:: classref-constant
  546. **NOTIFICATION_INTERNAL_PROCESS** = ``25`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`
  547. Notification received from the tree every rendered frame when :ref:`is_processing_internal<class_Node_method_is_processing_internal>` returns ``true``.
  548. .. _class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS:
  549. .. rst-class:: classref-constant
  550. **NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = ``26`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`
  551. Notification received from the tree every physics frame when :ref:`is_physics_processing_internal<class_Node_method_is_physics_processing_internal>` returns ``true``.
  552. .. _class_Node_constant_NOTIFICATION_POST_ENTER_TREE:
  553. .. rst-class:: classref-constant
  554. **NOTIFICATION_POST_ENTER_TREE** = ``27`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_POST_ENTER_TREE>`
  555. Notification received when the node enters the tree, just before :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` may be received. Unlike the latter, it is sent every time the node enters tree, not just once.
  556. .. _class_Node_constant_NOTIFICATION_DISABLED:
  557. .. rst-class:: classref-constant
  558. **NOTIFICATION_DISABLED** = ``28`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_DISABLED>`
  559. Notification received when the node is disabled. See :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
  560. .. _class_Node_constant_NOTIFICATION_ENABLED:
  561. .. rst-class:: classref-constant
  562. **NOTIFICATION_ENABLED** = ``29`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_ENABLED>`
  563. Notification received when the node is enabled again after being disabled. See :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
  564. .. _class_Node_constant_NOTIFICATION_RESET_PHYSICS_INTERPOLATION:
  565. .. rst-class:: classref-constant
  566. **NOTIFICATION_RESET_PHYSICS_INTERPOLATION** = ``2001`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_RESET_PHYSICS_INTERPOLATION>`
  567. Notification received when :ref:`reset_physics_interpolation<class_Node_method_reset_physics_interpolation>` is called on the node or its ancestors.
  568. .. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE:
  569. .. rst-class:: classref-constant
  570. **NOTIFICATION_EDITOR_PRE_SAVE** = ``9001`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE>`
  571. 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.
  572. .. _class_Node_constant_NOTIFICATION_EDITOR_POST_SAVE:
  573. .. rst-class:: classref-constant
  574. **NOTIFICATION_EDITOR_POST_SAVE** = ``9002`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_EDITOR_POST_SAVE>`
  575. 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.
  576. .. _class_Node_constant_NOTIFICATION_WM_MOUSE_ENTER:
  577. .. rst-class:: classref-constant
  578. **NOTIFICATION_WM_MOUSE_ENTER** = ``1002`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_MOUSE_ENTER>`
  579. Notification received when the mouse enters the window.
  580. Implemented for embedded windows and on desktop and web platforms.
  581. .. _class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT:
  582. .. rst-class:: classref-constant
  583. **NOTIFICATION_WM_MOUSE_EXIT** = ``1003`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT>`
  584. Notification received when the mouse leaves the window.
  585. Implemented for embedded windows and on desktop and web platforms.
  586. .. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN:
  587. .. rst-class:: classref-constant
  588. **NOTIFICATION_WM_WINDOW_FOCUS_IN** = ``1004`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN>`
  589. Notification received from the OS when the node's :ref:`Window<class_Window>` ancestor 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 received).
  590. A :ref:`Window<class_Window>` node receives this notification when it is focused.
  591. .. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_OUT:
  592. .. rst-class:: classref-constant
  593. **NOTIFICATION_WM_WINDOW_FOCUS_OUT** = ``1005`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_OUT>`
  594. Notification received from the OS when the node's :ref:`Window<class_Window>` ancestor 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 received).
  595. A :ref:`Window<class_Window>` node receives this notification when it is defocused.
  596. .. _class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST:
  597. .. rst-class:: classref-constant
  598. **NOTIFICATION_WM_CLOSE_REQUEST** = ``1006`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST>`
  599. Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or :kbd:`Alt + F4`).
  600. Implemented on desktop platforms.
  601. .. _class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST:
  602. .. rst-class:: classref-constant
  603. **NOTIFICATION_WM_GO_BACK_REQUEST** = ``1007`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST>`
  604. Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
  605. Implemented only on Android.
  606. .. _class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED:
  607. .. rst-class:: classref-constant
  608. **NOTIFICATION_WM_SIZE_CHANGED** = ``1008`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED>`
  609. Notification received when the window is resized.
  610. \ **Note:** Only the resized :ref:`Window<class_Window>` node receives this notification, and it's not propagated to the child nodes.
  611. .. _class_Node_constant_NOTIFICATION_WM_DPI_CHANGE:
  612. .. rst-class:: classref-constant
  613. **NOTIFICATION_WM_DPI_CHANGE** = ``1009`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_DPI_CHANGE>`
  614. Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS.
  615. .. _class_Node_constant_NOTIFICATION_VP_MOUSE_ENTER:
  616. .. rst-class:: classref-constant
  617. **NOTIFICATION_VP_MOUSE_ENTER** = ``1010`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_VP_MOUSE_ENTER>`
  618. 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.
  619. .. _class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT:
  620. .. rst-class:: classref-constant
  621. **NOTIFICATION_VP_MOUSE_EXIT** = ``1011`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT>`
  622. 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.
  623. .. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING:
  624. .. rst-class:: classref-constant
  625. **NOTIFICATION_OS_MEMORY_WARNING** = ``2009`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING>`
  626. Notification received from the OS when the application is exceeding its allocated memory.
  627. Implemented only on iOS.
  628. .. _class_Node_constant_NOTIFICATION_TRANSLATION_CHANGED:
  629. .. rst-class:: classref-constant
  630. **NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_TRANSLATION_CHANGED>`
  631. Notification received when translations may have changed. Can be triggered by the user changing the locale, changing :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` or when the node enters the scene tree. 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>`.
  632. \ **Note:** This notification is received alongside :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`is_node_ready<class_Node_method_is_node_ready>`.
  633. ::
  634. func _notification(what):
  635. if what == NOTIFICATION_TRANSLATION_CHANGED:
  636. if not is_node_ready():
  637. await ready # Wait until ready signal.
  638. $Label.text = atr("%d Bananas") % banana_counter
  639. .. _class_Node_constant_NOTIFICATION_WM_ABOUT:
  640. .. rst-class:: classref-constant
  641. **NOTIFICATION_WM_ABOUT** = ``2011`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_WM_ABOUT>`
  642. Notification received from the OS when a request for "About" information is sent.
  643. Implemented only on macOS.
  644. .. _class_Node_constant_NOTIFICATION_CRASH:
  645. .. rst-class:: classref-constant
  646. **NOTIFICATION_CRASH** = ``2012`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_CRASH>`
  647. Notification received from Godot's crash handler when the engine is about to crash.
  648. Implemented on desktop platforms, if the crash handler is enabled.
  649. .. _class_Node_constant_NOTIFICATION_OS_IME_UPDATE:
  650. .. rst-class:: classref-constant
  651. **NOTIFICATION_OS_IME_UPDATE** = ``2013`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_OS_IME_UPDATE>`
  652. Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
  653. Implemented only on macOS.
  654. .. _class_Node_constant_NOTIFICATION_APPLICATION_RESUMED:
  655. .. rst-class:: classref-constant
  656. **NOTIFICATION_APPLICATION_RESUMED** = ``2014`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_APPLICATION_RESUMED>`
  657. Notification received from the OS when the application is resumed.
  658. Specific to the Android and iOS platforms.
  659. .. _class_Node_constant_NOTIFICATION_APPLICATION_PAUSED:
  660. .. rst-class:: classref-constant
  661. **NOTIFICATION_APPLICATION_PAUSED** = ``2015`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_APPLICATION_PAUSED>`
  662. Notification received from the OS when the application is paused.
  663. Specific to the Android and iOS platforms.
  664. \ **Note:** On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it.
  665. .. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN:
  666. .. rst-class:: classref-constant
  667. **NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN>`
  668. 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.
  669. Implemented on desktop and mobile platforms.
  670. .. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT:
  671. .. rst-class:: classref-constant
  672. **NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT>`
  673. 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.
  674. Implemented on desktop and mobile platforms.
  675. .. _class_Node_constant_NOTIFICATION_TEXT_SERVER_CHANGED:
  676. .. rst-class:: classref-constant
  677. **NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018`` :ref:`๐Ÿ”—<class_Node_constant_NOTIFICATION_TEXT_SERVER_CHANGED>`
  678. Notification received when the :ref:`TextServer<class_TextServer>` is changed.
  679. .. rst-class:: classref-section-separator
  680. ----
  681. .. rst-class:: classref-descriptions-group
  682. Property Descriptions
  683. ---------------------
  684. .. _class_Node_property_auto_translate_mode:
  685. .. rst-class:: classref-property
  686. :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **auto_translate_mode** = ``0`` :ref:`๐Ÿ”—<class_Node_property_auto_translate_mode>`
  687. .. rst-class:: classref-property-setget
  688. - |void| **set_auto_translate_mode**\ (\ value\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ )
  689. - :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_auto_translate_mode**\ (\ )
  690. Defines if any text should automatically change to its translated version depending on the current locale (for nodes such as :ref:`Label<class_Label>`, :ref:`RichTextLabel<class_RichTextLabel>`, :ref:`Window<class_Window>`, etc.). Also decides if the node's strings should be parsed for POT generation.
  691. \ **Note:** For the root node, auto translate mode can also be set via :ref:`ProjectSettings.internationalization/rendering/root_node_auto_translate<class_ProjectSettings_property_internationalization/rendering/root_node_auto_translate>`.
  692. .. rst-class:: classref-item-separator
  693. ----
  694. .. _class_Node_property_editor_description:
  695. .. rst-class:: classref-property
  696. :ref:`String<class_String>` **editor_description** = ``""`` :ref:`๐Ÿ”—<class_Node_property_editor_description>`
  697. .. rst-class:: classref-property-setget
  698. - |void| **set_editor_description**\ (\ value\: :ref:`String<class_String>`\ )
  699. - :ref:`String<class_String>` **get_editor_description**\ (\ )
  700. An optional description to the node. It will be displayed as a tooltip when hovering over the node in the editor's Scene dock.
  701. .. rst-class:: classref-item-separator
  702. ----
  703. .. _class_Node_property_multiplayer:
  704. .. rst-class:: classref-property
  705. :ref:`MultiplayerAPI<class_MultiplayerAPI>` **multiplayer** :ref:`๐Ÿ”—<class_Node_property_multiplayer>`
  706. .. rst-class:: classref-property-setget
  707. - :ref:`MultiplayerAPI<class_MultiplayerAPI>` **get_multiplayer**\ (\ )
  708. The :ref:`MultiplayerAPI<class_MultiplayerAPI>` instance associated with this node. See :ref:`SceneTree.get_multiplayer<class_SceneTree_method_get_multiplayer>`.
  709. \ **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.
  710. .. rst-class:: classref-item-separator
  711. ----
  712. .. _class_Node_property_name:
  713. .. rst-class:: classref-property
  714. :ref:`StringName<class_StringName>` **name** :ref:`๐Ÿ”—<class_Node_property_name>`
  715. .. rst-class:: classref-property-setget
  716. - |void| **set_name**\ (\ value\: :ref:`StringName<class_StringName>`\ )
  717. - :ref:`StringName<class_StringName>` **get_name**\ (\ )
  718. The name of the node. This name must be unique among the siblings (other child nodes from the same parent). When set to an existing sibling's name, the node is automatically renamed.
  719. \ **Note:** When changing the name, the following characters will be replaced with an underscore: (``.`` ``:`` ``@`` ``/`` ``"`` ``%``). In particular, the ``@`` character is reserved for auto-generated names. See also :ref:`String.validate_node_name<class_String_method_validate_node_name>`.
  720. .. rst-class:: classref-item-separator
  721. ----
  722. .. _class_Node_property_owner:
  723. .. rst-class:: classref-property
  724. :ref:`Node<class_Node>` **owner** :ref:`๐Ÿ”—<class_Node_property_owner>`
  725. .. rst-class:: classref-property-setget
  726. - |void| **set_owner**\ (\ value\: :ref:`Node<class_Node>`\ )
  727. - :ref:`Node<class_Node>` **get_owner**\ (\ )
  728. The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a :ref:`PackedScene<class_PackedScene>`, all the nodes it owns are also saved with it.
  729. \ **Note:** In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will **not** be saved. To prevent this, remember to set the owner after calling :ref:`add_child<class_Node_method_add_child>`. See also (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`)
  730. .. rst-class:: classref-item-separator
  731. ----
  732. .. _class_Node_property_physics_interpolation_mode:
  733. .. rst-class:: classref-property
  734. :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **physics_interpolation_mode** = ``0`` :ref:`๐Ÿ”—<class_Node_property_physics_interpolation_mode>`
  735. .. rst-class:: classref-property-setget
  736. - |void| **set_physics_interpolation_mode**\ (\ value\: :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>`\ )
  737. - :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **get_physics_interpolation_mode**\ (\ )
  738. Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally. See :ref:`ProjectSettings.physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>` and :ref:`SceneTree.physics_interpolation<class_SceneTree_property_physics_interpolation>` for the global setting.
  739. \ **Note:** When teleporting a node to a distant position you should temporarily disable interpolation with :ref:`reset_physics_interpolation<class_Node_method_reset_physics_interpolation>`.
  740. .. rst-class:: classref-item-separator
  741. ----
  742. .. _class_Node_property_process_mode:
  743. .. rst-class:: classref-property
  744. :ref:`ProcessMode<enum_Node_ProcessMode>` **process_mode** = ``0`` :ref:`๐Ÿ”—<class_Node_property_process_mode>`
  745. .. rst-class:: classref-property-setget
  746. - |void| **set_process_mode**\ (\ value\: :ref:`ProcessMode<enum_Node_ProcessMode>`\ )
  747. - :ref:`ProcessMode<enum_Node_ProcessMode>` **get_process_mode**\ (\ )
  748. The node's processing behavior (see :ref:`ProcessMode<enum_Node_ProcessMode>`). To check if the node can process in its current mode, use :ref:`can_process<class_Node_method_can_process>`.
  749. .. rst-class:: classref-item-separator
  750. ----
  751. .. _class_Node_property_process_physics_priority:
  752. .. rst-class:: classref-property
  753. :ref:`int<class_int>` **process_physics_priority** = ``0`` :ref:`๐Ÿ”—<class_Node_property_process_physics_priority>`
  754. .. rst-class:: classref-property-setget
  755. - |void| **set_physics_process_priority**\ (\ value\: :ref:`int<class_int>`\ )
  756. - :ref:`int<class_int>` **get_physics_process_priority**\ (\ )
  757. 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.
  758. .. rst-class:: classref-item-separator
  759. ----
  760. .. _class_Node_property_process_priority:
  761. .. rst-class:: classref-property
  762. :ref:`int<class_int>` **process_priority** = ``0`` :ref:`๐Ÿ”—<class_Node_property_process_priority>`
  763. .. rst-class:: classref-property-setget
  764. - |void| **set_process_priority**\ (\ value\: :ref:`int<class_int>`\ )
  765. - :ref:`int<class_int>` **get_process_priority**\ (\ )
  766. The node's execution order of the process callbacks (:ref:`_process<class_Node_private_method__process>`, :ref:`_physics_process<class_Node_private_method__physics_process>`, and internal processing). Nodes whose priority value is *lower* call their process callbacks first, regardless of tree order.
  767. .. rst-class:: classref-item-separator
  768. ----
  769. .. _class_Node_property_process_thread_group:
  770. .. rst-class:: classref-property
  771. :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **process_thread_group** = ``0`` :ref:`๐Ÿ”—<class_Node_property_process_thread_group>`
  772. .. rst-class:: classref-property-setget
  773. - |void| **set_process_thread_group**\ (\ value\: :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>`\ )
  774. - :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **get_process_thread_group**\ (\ )
  775. 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.
  776. 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.
  777. 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).
  778. 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 child (and grandchild) 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.
  779. .. rst-class:: classref-item-separator
  780. ----
  781. .. _class_Node_property_process_thread_group_order:
  782. .. rst-class:: classref-property
  783. :ref:`int<class_int>` **process_thread_group_order** :ref:`๐Ÿ”—<class_Node_property_process_thread_group_order>`
  784. .. rst-class:: classref-property-setget
  785. - |void| **set_process_thread_group_order**\ (\ value\: :ref:`int<class_int>`\ )
  786. - :ref:`int<class_int>` **get_process_thread_group_order**\ (\ )
  787. 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.
  788. .. rst-class:: classref-item-separator
  789. ----
  790. .. _class_Node_property_process_thread_messages:
  791. .. rst-class:: classref-property
  792. |bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\] **process_thread_messages** :ref:`๐Ÿ”—<class_Node_property_process_thread_messages>`
  793. .. rst-class:: classref-property-setget
  794. - |void| **set_process_thread_messages**\ (\ value\: |bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\]\ )
  795. - |bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\] **get_process_thread_messages**\ (\ )
  796. 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.
  797. .. rst-class:: classref-item-separator
  798. ----
  799. .. _class_Node_property_scene_file_path:
  800. .. rst-class:: classref-property
  801. :ref:`String<class_String>` **scene_file_path** :ref:`๐Ÿ”—<class_Node_property_scene_file_path>`
  802. .. rst-class:: classref-property-setget
  803. - |void| **set_scene_file_path**\ (\ value\: :ref:`String<class_String>`\ )
  804. - :ref:`String<class_String>` **get_scene_file_path**\ (\ )
  805. The original scene's file path, if the node has been instantiated from a :ref:`PackedScene<class_PackedScene>` file. Only scene root nodes contains this.
  806. .. rst-class:: classref-item-separator
  807. ----
  808. .. _class_Node_property_unique_name_in_owner:
  809. .. rst-class:: classref-property
  810. :ref:`bool<class_bool>` **unique_name_in_owner** = ``false`` :ref:`๐Ÿ”—<class_Node_property_unique_name_in_owner>`
  811. .. rst-class:: classref-property-setget
  812. - |void| **set_unique_name_in_owner**\ (\ value\: :ref:`bool<class_bool>`\ )
  813. - :ref:`bool<class_bool>` **is_unique_name_in_owner**\ (\ )
  814. If ``true``, the node can be accessed from any node sharing the same :ref:`owner<class_Node_property_owner>` or from the :ref:`owner<class_Node_property_owner>` itself, with special ``%Name`` syntax in :ref:`get_node<class_Node_method_get_node>`.
  815. \ **Note:** If another node with the same :ref:`owner<class_Node_property_owner>` shares the same :ref:`name<class_Node_property_name>` as this node, the other node will no longer be accessible as unique.
  816. .. rst-class:: classref-section-separator
  817. ----
  818. .. rst-class:: classref-descriptions-group
  819. Method Descriptions
  820. -------------------
  821. .. _class_Node_private_method__enter_tree:
  822. .. rst-class:: classref-method
  823. |void| **_enter_tree**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__enter_tree>`
  824. Called when the node enters the :ref:`SceneTree<class_SceneTree>` (e.g. upon instantiating, 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.
  825. Corresponds to the :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification in :ref:`Object._notification<class_Object_private_method__notification>`.
  826. .. rst-class:: classref-item-separator
  827. ----
  828. .. _class_Node_private_method__exit_tree:
  829. .. rst-class:: classref-method
  830. |void| **_exit_tree**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__exit_tree>`
  831. 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.
  832. 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>`.
  833. .. rst-class:: classref-item-separator
  834. ----
  835. .. _class_Node_private_method__get_configuration_warnings:
  836. .. rst-class:: classref-method
  837. :ref:`PackedStringArray<class_PackedStringArray>` **_get_configuration_warnings**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—<class_Node_private_method__get_configuration_warnings>`
  838. 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.
  839. Returning an empty array produces no warnings.
  840. Call :ref:`update_configuration_warnings<class_Node_method_update_configuration_warnings>` when the warnings need to be updated for this node.
  841. ::
  842. @export var energy = 0:
  843. set(value):
  844. energy = value
  845. update_configuration_warnings()
  846. func _get_configuration_warnings():
  847. if energy < 0:
  848. return ["Energy must be 0 or greater."]
  849. else:
  850. return []
  851. .. rst-class:: classref-item-separator
  852. ----
  853. .. _class_Node_private_method__input:
  854. .. rst-class:: classref-method
  855. |void| **_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__input>`
  856. Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
  857. 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>`.
  858. 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.
  859. 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.
  860. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
  861. .. rst-class:: classref-item-separator
  862. ----
  863. .. _class_Node_private_method__physics_process:
  864. .. rst-class:: classref-method
  865. |void| **_physics_process**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__physics_process>`
  866. 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.
  867. 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>`.
  868. Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` notification in :ref:`Object._notification<class_Object_private_method__notification>`.
  869. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
  870. .. rst-class:: classref-item-separator
  871. ----
  872. .. _class_Node_private_method__process:
  873. .. rst-class:: classref-method
  874. |void| **_process**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__process>`
  875. 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.
  876. 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>`.
  877. Corresponds to the :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` notification in :ref:`Object._notification<class_Object_private_method__notification>`.
  878. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
  879. .. rst-class:: classref-item-separator
  880. ----
  881. .. _class_Node_private_method__ready:
  882. .. rst-class:: classref-method
  883. |void| **_ready**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__ready>`
  884. 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.
  885. 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.
  886. 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>`.
  887. \ **Note:** This method 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.
  888. .. rst-class:: classref-item-separator
  889. ----
  890. .. _class_Node_private_method__shortcut_input:
  891. .. rst-class:: classref-method
  892. |void| **_shortcut_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__shortcut_input>`
  893. Called when an :ref:`InputEventKey<class_InputEventKey>`, :ref:`InputEventShortcut<class_InputEventShortcut>`, or :ref:`InputEventJoypadButton<class_InputEventJoypadButton>` 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.
  894. 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>`.
  895. 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.
  896. 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>`.
  897. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
  898. .. rst-class:: classref-item-separator
  899. ----
  900. .. _class_Node_private_method__unhandled_input:
  901. .. rst-class:: classref-method
  902. |void| **_unhandled_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__unhandled_input>`
  903. 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.
  904. 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>`.
  905. 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.
  906. 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.
  907. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
  908. .. rst-class:: classref-item-separator
  909. ----
  910. .. _class_Node_private_method__unhandled_key_input:
  911. .. rst-class:: classref-method
  912. |void| **_unhandled_key_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`๐Ÿ”—<class_Node_private_method__unhandled_key_input>`
  913. 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.
  914. 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>`.
  915. 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.
  916. 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.
  917. 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.
  918. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
  919. .. rst-class:: classref-item-separator
  920. ----
  921. .. _class_Node_method_add_child:
  922. .. rst-class:: classref-method
  923. |void| **add_child**\ (\ node\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false, internal\: :ref:`InternalMode<enum_Node_InternalMode>` = 0\ ) :ref:`๐Ÿ”—<class_Node_method_add_child>`
  924. 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.
  925. 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.
  926. If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED<class_Node_constant_INTERNAL_MODE_DISABLED>`, the child will be added as internal node. These 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.
  927. \ **Note:** If ``node`` already has a parent, this method will fail. Use :ref:`remove_child<class_Node_method_remove_child>` first to remove ``node`` from its current parent. For example:
  928. .. tabs::
  929. .. code-tab:: gdscript
  930. var child_node = get_child(0)
  931. if child_node.get_parent():
  932. child_node.get_parent().remove_child(child_node)
  933. add_child(child_node)
  934. .. code-tab:: csharp
  935. Node childNode = GetChild(0);
  936. if (childNode.GetParent() != null)
  937. {
  938. childNode.GetParent().RemoveChild(childNode);
  939. }
  940. AddChild(childNode);
  941. 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.
  942. \ **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.
  943. .. rst-class:: classref-item-separator
  944. ----
  945. .. _class_Node_method_add_sibling:
  946. .. rst-class:: classref-method
  947. |void| **add_sibling**\ (\ sibling\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_Node_method_add_sibling>`
  948. Adds a ``sibling`` node to this node's parent, and moves the added sibling right below this node.
  949. 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.
  950. 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.
  951. \ **Note:** If this node is internal, the added sibling will be internal too (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter).
  952. .. rst-class:: classref-item-separator
  953. ----
  954. .. _class_Node_method_add_to_group:
  955. .. rst-class:: classref-method
  956. |void| **add_to_group**\ (\ group\: :ref:`StringName<class_StringName>`, persistent\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_Node_method_add_to_group>`
  957. Adds the node to the ``group``. Groups can be helpful to organize a subset of nodes, for example ``"enemies"`` or ``"collectables"``. See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`.
  958. If ``persistent`` is ``true``, the group will be stored when saved inside a :ref:`PackedScene<class_PackedScene>`. All groups created and displayed in the Node dock are persistent.
  959. \ **Note:** To improve performance, the order of group names is *not* guaranteed and may vary between project runs. Therefore, do not rely on the group order.
  960. \ **Note:** :ref:`SceneTree<class_SceneTree>`'s group methods will *not* work on this node if not inside the tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`).
  961. .. rst-class:: classref-item-separator
  962. ----
  963. .. _class_Node_method_atr:
  964. .. rst-class:: classref-method
  965. :ref:`String<class_String>` **atr**\ (\ message\: :ref:`String<class_String>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| :ref:`๐Ÿ”—<class_Node_method_atr>`
  966. Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. Note that most :ref:`Control<class_Control>` nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text.
  967. This method works the same as :ref:`Object.tr<class_Object_method_tr>`, with the addition of respecting the :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` state.
  968. If :ref:`Object.can_translate_messages<class_Object_method_can_translate_messages>` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`Object.set_message_translation<class_Object_method_set_message_translation>`.
  969. For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/internationalizing_games>`.
  970. .. rst-class:: classref-item-separator
  971. ----
  972. .. _class_Node_method_atr_n:
  973. .. rst-class:: classref-method
  974. :ref:`String<class_String>` **atr_n**\ (\ message\: :ref:`String<class_String>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| :ref:`๐Ÿ”—<class_Node_method_atr_n>`
  975. Translates a ``message`` or ``plural_message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation.
  976. This method works the same as :ref:`Object.tr_n<class_Object_method_tr_n>`, with the addition of respecting the :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` state.
  977. If :ref:`Object.can_translate_messages<class_Object_method_can_translate_messages>` is ``false``, or no translation is available, this method returns ``message`` or ``plural_message``, without changes. See :ref:`Object.set_message_translation<class_Object_method_set_message_translation>`.
  978. The ``n`` is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language.
  979. For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/localization_using_gettext>`.
  980. \ **Note:** Negative and :ref:`float<class_float>` numbers may not properly apply to some countable subjects. It's recommended to handle these cases with :ref:`atr<class_Node_method_atr>`.
  981. .. rst-class:: classref-item-separator
  982. ----
  983. .. _class_Node_method_call_deferred_thread_group:
  984. .. rst-class:: classref-method
  985. :ref:`Variant<class_Variant>` **call_deferred_thread_group**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`๐Ÿ”—<class_Node_method_call_deferred_thread_group>`
  986. 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.
  987. .. rst-class:: classref-item-separator
  988. ----
  989. .. _class_Node_method_call_thread_safe:
  990. .. rst-class:: classref-method
  991. :ref:`Variant<class_Variant>` **call_thread_safe**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`๐Ÿ”—<class_Node_method_call_thread_safe>`
  992. 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.
  993. .. rst-class:: classref-item-separator
  994. ----
  995. .. _class_Node_method_can_process:
  996. .. rst-class:: classref-method
  997. :ref:`bool<class_bool>` **can_process**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_can_process>`
  998. Returns ``true`` if the node can receive processing notifications and input callbacks (:ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`_input<class_Node_private_method__input>`, etc.) from the :ref:`SceneTree<class_SceneTree>` and :ref:`Viewport<class_Viewport>`. The returned value depends on :ref:`process_mode<class_Node_property_process_mode>`:
  999. - If set to :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`, returns ``true`` when the game is processing, i.e. :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``false``;
  1000. - If set to :ref:`PROCESS_MODE_WHEN_PAUSED<class_Node_constant_PROCESS_MODE_WHEN_PAUSED>`, returns ``true`` when the game is paused, i.e. :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``true``;
  1001. - If set to :ref:`PROCESS_MODE_ALWAYS<class_Node_constant_PROCESS_MODE_ALWAYS>`, always returns ``true``;
  1002. - If set to :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`, always returns ``false``;
  1003. - If set to :ref:`PROCESS_MODE_INHERIT<class_Node_constant_PROCESS_MODE_INHERIT>`, use the parent node's :ref:`process_mode<class_Node_property_process_mode>` to determine the result.
  1004. If the node is not inside the tree, returns ``false`` no matter the value of :ref:`process_mode<class_Node_property_process_mode>`.
  1005. .. rst-class:: classref-item-separator
  1006. ----
  1007. .. _class_Node_method_create_tween:
  1008. .. rst-class:: classref-method
  1009. :ref:`Tween<class_Tween>` **create_tween**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_create_tween>`
  1010. Creates a new :ref:`Tween<class_Tween>` and binds it to this node.
  1011. This is the equivalent of doing:
  1012. .. tabs::
  1013. .. code-tab:: gdscript
  1014. get_tree().create_tween().bind_node(self)
  1015. .. code-tab:: csharp
  1016. GetTree().CreateTween().BindNode(this);
  1017. The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`). See :ref:`Tween.bind_node<class_Tween_method_bind_node>` for more info on Tweens bound to nodes.
  1018. \ **Note:** The method can still be used when the node is not inside :ref:`SceneTree<class_SceneTree>`. It can fail in an unlikely case of using a custom :ref:`MainLoop<class_MainLoop>`.
  1019. .. rst-class:: classref-item-separator
  1020. ----
  1021. .. _class_Node_method_duplicate:
  1022. .. rst-class:: classref-method
  1023. :ref:`Node<class_Node>` **duplicate**\ (\ flags\: :ref:`int<class_int>` = 15\ ) |const| :ref:`๐Ÿ”—<class_Node_method_duplicate>`
  1024. Duplicates the node, returning a new node with all of its properties, signals and groups copied from the original. The behavior can be tweaked through the ``flags`` (see :ref:`DuplicateFlags<enum_Node_DuplicateFlags>`).
  1025. \ **Note:** For nodes with a :ref:`Script<class_Script>` attached, if :ref:`Object._init<class_Object_private_method__init>` has been defined with required parameters, the duplicated node will not have a :ref:`Script<class_Script>`.
  1026. .. rst-class:: classref-item-separator
  1027. ----
  1028. .. _class_Node_method_find_child:
  1029. .. rst-class:: classref-method
  1030. :ref:`Node<class_Node>` **find_child**\ (\ pattern\: :ref:`String<class_String>`, recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`๐Ÿ”—<class_Node_method_find_child>`
  1031. Finds the first descendant of this node whose :ref:`name<class_Node_property_name>` matches ``pattern``, returning ``null`` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match<class_String_method_match>`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character.
  1032. If ``recursive`` is ``false``, only this node's direct children are checked. 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. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
  1033. If ``owned`` is ``true``, only descendants with a valid :ref:`owner<class_Node_property_owner>` node are checked.
  1034. \ **Note:** This method can be very slow. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node<class_Node_method_get_node>` with unique names (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`).
  1035. \ **Note:** To find all descendant nodes matching a pattern or a class type, see :ref:`find_children<class_Node_method_find_children>`.
  1036. .. rst-class:: classref-item-separator
  1037. ----
  1038. .. _class_Node_method_find_children:
  1039. .. rst-class:: classref-method
  1040. :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **find_children**\ (\ pattern\: :ref:`String<class_String>`, type\: :ref:`String<class_String>` = "", recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`๐Ÿ”—<class_Node_method_find_children>`
  1041. Finds all descendants of this node whose names match ``pattern``, returning an empty :ref:`Array<class_Array>` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match<class_String_method_match>`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character.
  1042. If ``type`` is not empty, only ancestors inheriting from ``type`` are included (see :ref:`Object.is_class<class_Object_method_is_class>`).
  1043. If ``recursive`` is ``false``, only this node's direct children are checked. 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. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`).
  1044. If ``owned`` is ``true``, only descendants with a valid :ref:`owner<class_Node_property_owner>` node are checked.
  1045. \ **Note:** This method can be very slow. Consider storing references to the found nodes in a variable.
  1046. \ **Note:** To find a single descendant node matching a pattern, see :ref:`find_child<class_Node_method_find_child>`.
  1047. .. rst-class:: classref-item-separator
  1048. ----
  1049. .. _class_Node_method_find_parent:
  1050. .. rst-class:: classref-method
  1051. :ref:`Node<class_Node>` **find_parent**\ (\ pattern\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_find_parent>`
  1052. Finds the first ancestor of this node whose :ref:`name<class_Node_property_name>` matches ``pattern``, returning ``null`` if no match is found. The matching is done through :ref:`String.match<class_String_method_match>`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. See also :ref:`find_child<class_Node_method_find_child>` and :ref:`find_children<class_Node_method_find_children>`.
  1053. \ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node<class_Node_method_get_node>` with unique names (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`).
  1054. .. rst-class:: classref-item-separator
  1055. ----
  1056. .. _class_Node_method_get_child:
  1057. .. rst-class:: classref-method
  1058. :ref:`Node<class_Node>` **get_child**\ (\ idx\: :ref:`int<class_int>`, include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_child>`
  1059. Fetches a child node by its index. Each child node has an index relative its siblings (see :ref:`get_index<class_Node_method_get_index>`). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with :ref:`get_child_count<class_Node_method_get_child_count>` to iterate over this node's children. If no child exists at the given index, this method returns ``null`` and an error is generated.
  1060. If ``include_internal`` is ``false``, internal children are ignored (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter).
  1061. ::
  1062. # Assuming the following are children of this node, in order:
  1063. # First, Middle, Last.
  1064. var a = get_child(0).name # a is "First"
  1065. var b = get_child(1).name # b is "Middle"
  1066. var b = get_child(2).name # b is "Last"
  1067. var c = get_child(-1).name # c is "Last"
  1068. \ **Note:** To fetch a node by :ref:`NodePath<class_NodePath>`, use :ref:`get_node<class_Node_method_get_node>`.
  1069. .. rst-class:: classref-item-separator
  1070. ----
  1071. .. _class_Node_method_get_child_count:
  1072. .. rst-class:: classref-method
  1073. :ref:`int<class_int>` **get_child_count**\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_child_count>`
  1074. Returns the number of children of this node.
  1075. If ``include_internal`` is ``false``, internal children are not counted (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter).
  1076. .. rst-class:: classref-item-separator
  1077. ----
  1078. .. _class_Node_method_get_children:
  1079. .. rst-class:: classref-method
  1080. :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **get_children**\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_children>`
  1081. Returns all children of this node inside an :ref:`Array<class_Array>`.
  1082. If ``include_internal`` is ``false``, excludes internal children from the returned array (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter).
  1083. .. rst-class:: classref-item-separator
  1084. ----
  1085. .. _class_Node_method_get_groups:
  1086. .. rst-class:: classref-method
  1087. :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_groups**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_groups>`
  1088. Returns an :ref:`Array<class_Array>` of group names that the node has been added to.
  1089. \ **Note:** To improve performance, the order of group names is *not* guaranteed and may vary between project runs. Therefore, do not rely on the group order.
  1090. \ **Note:** This method may also return some group names starting with an underscore (``_``). These are internally used by the engine. To avoid conflicts, do not use custom groups starting with underscores. To exclude internal groups, see the following code snippet:
  1091. .. tabs::
  1092. .. code-tab:: gdscript
  1093. # Stores the node's non-internal groups only (as an array of StringNames).
  1094. var non_internal_groups = []
  1095. for group in get_groups():
  1096. if not str(group).begins_with("_"):
  1097. non_internal_groups.push_back(group)
  1098. .. code-tab:: csharp
  1099. // Stores the node's non-internal groups only (as a List of StringNames).
  1100. List<string> nonInternalGroups = new List<string>();
  1101. foreach (string group in GetGroups())
  1102. {
  1103. if (!group.BeginsWith("_"))
  1104. nonInternalGroups.Add(group);
  1105. }
  1106. .. rst-class:: classref-item-separator
  1107. ----
  1108. .. _class_Node_method_get_index:
  1109. .. rst-class:: classref-method
  1110. :ref:`int<class_int>` **get_index**\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_index>`
  1111. Returns this node's order among its siblings. The first node's index is ``0``. See also :ref:`get_child<class_Node_method_get_child>`.
  1112. If ``include_internal`` is ``false``, returns the index ignoring internal children. The first, non-internal child will have an index of ``0`` (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter).
  1113. .. rst-class:: classref-item-separator
  1114. ----
  1115. .. _class_Node_method_get_last_exclusive_window:
  1116. .. rst-class:: classref-method
  1117. :ref:`Window<class_Window>` **get_last_exclusive_window**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_last_exclusive_window>`
  1118. 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.
  1119. .. rst-class:: classref-item-separator
  1120. ----
  1121. .. _class_Node_method_get_multiplayer_authority:
  1122. .. rst-class:: classref-method
  1123. :ref:`int<class_int>` **get_multiplayer_authority**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_multiplayer_authority>`
  1124. Returns the peer ID of the multiplayer authority for this node. See :ref:`set_multiplayer_authority<class_Node_method_set_multiplayer_authority>`.
  1125. .. rst-class:: classref-item-separator
  1126. ----
  1127. .. _class_Node_method_get_node:
  1128. .. rst-class:: classref-method
  1129. :ref:`Node<class_Node>` **get_node**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_node>`
  1130. Fetches a node. The :ref:`NodePath<class_NodePath>` can either be a relative path (from this node), or an absolute path (from the :ref:`SceneTree.root<class_SceneTree_property_root>`) to a node. If ``path`` does not point to a valid node, generates an error and returns ``null``. Attempts to access methods on the return value will result in an *"Attempt to call <method> on a null instance."* error.
  1131. \ **Note:** Fetching by absolute path only works when the node is inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`).
  1132. \ **Example:** Assume this method is called from the Character node, inside the following tree:
  1133. .. code:: text
  1134. โ”–โ•ดroot
  1135. โ” โ•ดCharacter (you are here!)
  1136. โ”ƒ โ” โ•ดSword
  1137. โ”ƒ โ”–โ•ดBackpack
  1138. โ”ƒ โ”–โ•ดDagger
  1139. โ” โ•ดMyGame
  1140. โ”–โ•ดSwamp
  1141. โ” โ•ดAlligator
  1142. โ” โ•ดMosquito
  1143. โ”–โ•ดGoblin
  1144. The following calls will return a valid node:
  1145. .. tabs::
  1146. .. code-tab:: gdscript
  1147. get_node("Sword")
  1148. get_node("Backpack/Dagger")
  1149. get_node("../Swamp/Alligator")
  1150. get_node("/root/MyGame")
  1151. .. code-tab:: csharp
  1152. GetNode("Sword");
  1153. GetNode("Backpack/Dagger");
  1154. GetNode("../Swamp/Alligator");
  1155. GetNode("/root/MyGame");
  1156. .. rst-class:: classref-item-separator
  1157. ----
  1158. .. _class_Node_method_get_node_and_resource:
  1159. .. rst-class:: classref-method
  1160. :ref:`Array<class_Array>` **get_node_and_resource**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`๐Ÿ”—<class_Node_method_get_node_and_resource>`
  1161. Fetches a node and its most nested resource as specified by the :ref:`NodePath<class_NodePath>`'s subname. Returns an :ref:`Array<class_Array>` of size ``3`` where:
  1162. - Element ``0`` is the **Node**, or ``null`` if not found;
  1163. - Element ``1`` is the subname's last nested :ref:`Resource<class_Resource>`, or ``null`` if not found;
  1164. - Element ``2`` is the remaining :ref:`NodePath<class_NodePath>`, referring to an existing, non-:ref:`Resource<class_Resource>` property (see :ref:`Object.get_indexed<class_Object_method_get_indexed>`).
  1165. \ **Example:** Assume that the child's :ref:`Sprite2D.texture<class_Sprite2D_property_texture>` has been assigned a :ref:`AtlasTexture<class_AtlasTexture>`:
  1166. .. tabs::
  1167. .. code-tab:: gdscript
  1168. var a = get_node_and_resource("Area2D/Sprite2D")
  1169. print(a[0].name) # Prints Sprite2D
  1170. print(a[1]) # Prints <null>
  1171. print(a[2]) # Prints ^""
  1172. var b = get_node_and_resource("Area2D/Sprite2D:texture:atlas")
  1173. print(b[0].name) # Prints Sprite2D
  1174. print(b[1].get_class()) # Prints AtlasTexture
  1175. print(b[2]) # Prints ^""
  1176. var c = get_node_and_resource("Area2D/Sprite2D:texture:atlas:region")
  1177. print(c[0].name) # Prints Sprite2D
  1178. print(c[1].get_class()) # Prints AtlasTexture
  1179. print(c[2]) # Prints ^":region"
  1180. .. code-tab:: csharp
  1181. var a = GetNodeAndResource(NodePath("Area2D/Sprite2D"));
  1182. GD.Print(a[0].Name); // Prints Sprite2D
  1183. GD.Print(a[1]); // Prints <null>
  1184. GD.Print(a[2]); // Prints ^"
  1185. var b = GetNodeAndResource(NodePath("Area2D/Sprite2D:texture:atlas"));
  1186. GD.Print(b[0].name); // Prints Sprite2D
  1187. GD.Print(b[1].get_class()); // Prints AtlasTexture
  1188. GD.Print(b[2]); // Prints ^""
  1189. var c = GetNodeAndResource(NodePath("Area2D/Sprite2D:texture:atlas:region"));
  1190. GD.Print(c[0].name); // Prints Sprite2D
  1191. GD.Print(c[1].get_class()); // Prints AtlasTexture
  1192. GD.Print(c[2]); // Prints ^":region"
  1193. .. rst-class:: classref-item-separator
  1194. ----
  1195. .. _class_Node_method_get_node_or_null:
  1196. .. rst-class:: classref-method
  1197. :ref:`Node<class_Node>` **get_node_or_null**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_node_or_null>`
  1198. Fetches a node by :ref:`NodePath<class_NodePath>`. Similar to :ref:`get_node<class_Node_method_get_node>`, but does not generate an error if ``path`` does not point to a valid node.
  1199. .. rst-class:: classref-item-separator
  1200. ----
  1201. .. _class_Node_method_get_parent:
  1202. .. rst-class:: classref-method
  1203. :ref:`Node<class_Node>` **get_parent**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_parent>`
  1204. Returns this node's parent node, or ``null`` if the node doesn't have a parent.
  1205. .. rst-class:: classref-item-separator
  1206. ----
  1207. .. _class_Node_method_get_path:
  1208. .. rst-class:: classref-method
  1209. :ref:`NodePath<class_NodePath>` **get_path**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_path>`
  1210. Returns the node's absolute path, relative to the :ref:`SceneTree.root<class_SceneTree_property_root>`. If the node is not inside the scene tree, this method fails and returns an empty :ref:`NodePath<class_NodePath>`.
  1211. .. rst-class:: classref-item-separator
  1212. ----
  1213. .. _class_Node_method_get_path_to:
  1214. .. rst-class:: classref-method
  1215. :ref:`NodePath<class_NodePath>` **get_path_to**\ (\ node\: :ref:`Node<class_Node>`, use_unique_path\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_path_to>`
  1216. Returns the relative :ref:`NodePath<class_NodePath>` from this node to the specified ``node``. Both nodes must be in the same :ref:`SceneTree<class_SceneTree>` or scene hierarchy, otherwise this method fails and returns an empty :ref:`NodePath<class_NodePath>`.
  1217. If ``use_unique_path`` is ``true``, returns the shortest path accounting for this node's unique name (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`).
  1218. \ **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.
  1219. .. rst-class:: classref-item-separator
  1220. ----
  1221. .. _class_Node_method_get_physics_process_delta_time:
  1222. .. rst-class:: classref-method
  1223. :ref:`float<class_float>` **get_physics_process_delta_time**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_physics_process_delta_time>`
  1224. Returns the time elapsed (in seconds) since the last physics callback. This value is identical to :ref:`_physics_process<class_Node_private_method__physics_process>`'s ``delta`` parameter, and is often consistent at run-time, unless :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` is changed. See also :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`.
  1225. .. rst-class:: classref-item-separator
  1226. ----
  1227. .. _class_Node_method_get_process_delta_time:
  1228. .. rst-class:: classref-method
  1229. :ref:`float<class_float>` **get_process_delta_time**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_process_delta_time>`
  1230. Returns the time elapsed (in seconds) since the last process callback. This value is identical to :ref:`_process<class_Node_private_method__process>`'s ``delta`` parameter, and may vary from frame to frame. See also :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`.
  1231. .. rst-class:: classref-item-separator
  1232. ----
  1233. .. _class_Node_method_get_scene_instance_load_placeholder:
  1234. .. rst-class:: classref-method
  1235. :ref:`bool<class_bool>` **get_scene_instance_load_placeholder**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_scene_instance_load_placeholder>`
  1236. Returns ``true`` if this node is an instance load placeholder. See :ref:`InstancePlaceholder<class_InstancePlaceholder>` and :ref:`set_scene_instance_load_placeholder<class_Node_method_set_scene_instance_load_placeholder>`.
  1237. .. rst-class:: classref-item-separator
  1238. ----
  1239. .. _class_Node_method_get_tree:
  1240. .. rst-class:: classref-method
  1241. :ref:`SceneTree<class_SceneTree>` **get_tree**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_tree>`
  1242. Returns the :ref:`SceneTree<class_SceneTree>` that contains this node. If this node is not inside the tree, generates an error and returns ``null``. See also :ref:`is_inside_tree<class_Node_method_is_inside_tree>`.
  1243. .. rst-class:: classref-item-separator
  1244. ----
  1245. .. _class_Node_method_get_tree_string:
  1246. .. rst-class:: classref-method
  1247. :ref:`String<class_String>` **get_tree_string**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_get_tree_string>`
  1248. 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.
  1249. May print, for example:
  1250. .. code:: text
  1251. TheGame
  1252. TheGame/Menu
  1253. TheGame/Menu/Label
  1254. TheGame/Menu/Camera2D
  1255. TheGame/SplashScreen
  1256. TheGame/SplashScreen/Camera2D
  1257. .. rst-class:: classref-item-separator
  1258. ----
  1259. .. _class_Node_method_get_tree_string_pretty:
  1260. .. rst-class:: classref-method
  1261. :ref:`String<class_String>` **get_tree_string_pretty**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_get_tree_string_pretty>`
  1262. 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.
  1263. May print, for example:
  1264. .. code:: text
  1265. โ”–โ•ดTheGame
  1266. โ” โ•ดMenu
  1267. โ”ƒ โ” โ•ดLabel
  1268. โ”ƒ โ”–โ•ดCamera2D
  1269. โ”–โ•ดSplashScreen
  1270. โ”–โ•ดCamera2D
  1271. .. rst-class:: classref-item-separator
  1272. ----
  1273. .. _class_Node_method_get_viewport:
  1274. .. rst-class:: classref-method
  1275. :ref:`Viewport<class_Viewport>` **get_viewport**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_viewport>`
  1276. Returns the node's closest :ref:`Viewport<class_Viewport>` ancestor, if the node is inside the tree. Otherwise, returns ``null``.
  1277. .. rst-class:: classref-item-separator
  1278. ----
  1279. .. _class_Node_method_get_window:
  1280. .. rst-class:: classref-method
  1281. :ref:`Window<class_Window>` **get_window**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_get_window>`
  1282. 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()``).
  1283. .. rst-class:: classref-item-separator
  1284. ----
  1285. .. _class_Node_method_has_node:
  1286. .. rst-class:: classref-method
  1287. :ref:`bool<class_bool>` **has_node**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_has_node>`
  1288. Returns ``true`` if the ``path`` points to a valid node. See also :ref:`get_node<class_Node_method_get_node>`.
  1289. .. rst-class:: classref-item-separator
  1290. ----
  1291. .. _class_Node_method_has_node_and_resource:
  1292. .. rst-class:: classref-method
  1293. :ref:`bool<class_bool>` **has_node_and_resource**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_has_node_and_resource>`
  1294. Returns ``true`` if ``path`` points to a valid node and its subnames point to a valid :ref:`Resource<class_Resource>`, e.g. ``Area2D/CollisionShape2D:shape``. Properties that are not :ref:`Resource<class_Resource>` types (such as nodes or other :ref:`Variant<class_Variant>` types) are not considered. See also :ref:`get_node_and_resource<class_Node_method_get_node_and_resource>`.
  1295. .. rst-class:: classref-item-separator
  1296. ----
  1297. .. _class_Node_method_is_ancestor_of:
  1298. .. rst-class:: classref-method
  1299. :ref:`bool<class_bool>` **is_ancestor_of**\ (\ node\: :ref:`Node<class_Node>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_ancestor_of>`
  1300. Returns ``true`` if the given ``node`` is a direct or indirect child of this node.
  1301. .. rst-class:: classref-item-separator
  1302. ----
  1303. .. _class_Node_method_is_displayed_folded:
  1304. .. rst-class:: classref-method
  1305. :ref:`bool<class_bool>` **is_displayed_folded**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_displayed_folded>`
  1306. Returns ``true`` if the node is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also :ref:`set_display_folded<class_Node_method_set_display_folded>`.
  1307. .. rst-class:: classref-item-separator
  1308. ----
  1309. .. _class_Node_method_is_editable_instance:
  1310. .. rst-class:: classref-method
  1311. :ref:`bool<class_bool>` **is_editable_instance**\ (\ node\: :ref:`Node<class_Node>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_editable_instance>`
  1312. Returns ``true`` if ``node`` has editable children enabled relative to this node. This method is intended to be used in editor plugins and tools. See also :ref:`set_editable_instance<class_Node_method_set_editable_instance>`.
  1313. .. rst-class:: classref-item-separator
  1314. ----
  1315. .. _class_Node_method_is_greater_than:
  1316. .. rst-class:: classref-method
  1317. :ref:`bool<class_bool>` **is_greater_than**\ (\ node\: :ref:`Node<class_Node>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_greater_than>`
  1318. Returns ``true`` if the given ``node`` occurs later in the scene hierarchy than this node. A node occurring later is usually processed last.
  1319. .. rst-class:: classref-item-separator
  1320. ----
  1321. .. _class_Node_method_is_in_group:
  1322. .. rst-class:: classref-method
  1323. :ref:`bool<class_bool>` **is_in_group**\ (\ group\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_in_group>`
  1324. Returns ``true`` if this node has been added to the given ``group``. See :ref:`add_to_group<class_Node_method_add_to_group>` and :ref:`remove_from_group<class_Node_method_remove_from_group>`. See also notes in the description, and the :ref:`SceneTree<class_SceneTree>`'s group methods.
  1325. .. rst-class:: classref-item-separator
  1326. ----
  1327. .. _class_Node_method_is_inside_tree:
  1328. .. rst-class:: classref-method
  1329. :ref:`bool<class_bool>` **is_inside_tree**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_inside_tree>`
  1330. Returns ``true`` if this node is currently inside a :ref:`SceneTree<class_SceneTree>`. See also :ref:`get_tree<class_Node_method_get_tree>`.
  1331. .. rst-class:: classref-item-separator
  1332. ----
  1333. .. _class_Node_method_is_multiplayer_authority:
  1334. .. rst-class:: classref-method
  1335. :ref:`bool<class_bool>` **is_multiplayer_authority**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_multiplayer_authority>`
  1336. Returns ``true`` if the local system is the multiplayer authority of this node.
  1337. .. rst-class:: classref-item-separator
  1338. ----
  1339. .. _class_Node_method_is_node_ready:
  1340. .. rst-class:: classref-method
  1341. :ref:`bool<class_bool>` **is_node_ready**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_node_ready>`
  1342. Returns ``true`` if the node is ready, i.e. it's inside scene tree and all its children are initialized.
  1343. \ :ref:`request_ready<class_Node_method_request_ready>` resets it back to ``false``.
  1344. .. rst-class:: classref-item-separator
  1345. ----
  1346. .. _class_Node_method_is_part_of_edited_scene:
  1347. .. rst-class:: classref-method
  1348. :ref:`bool<class_bool>` **is_part_of_edited_scene**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_part_of_edited_scene>`
  1349. Returns ``true`` if the node is part of the scene currently opened in the editor.
  1350. .. rst-class:: classref-item-separator
  1351. ----
  1352. .. _class_Node_method_is_physics_interpolated:
  1353. .. rst-class:: classref-method
  1354. :ref:`bool<class_bool>` **is_physics_interpolated**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_physics_interpolated>`
  1355. Returns ``true`` if physics interpolation is enabled for this node (see :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>`).
  1356. \ **Note:** Interpolation will only be active if both the flag is set **and** physics interpolation is enabled within the :ref:`SceneTree<class_SceneTree>`. This can be tested using :ref:`is_physics_interpolated_and_enabled<class_Node_method_is_physics_interpolated_and_enabled>`.
  1357. .. rst-class:: classref-item-separator
  1358. ----
  1359. .. _class_Node_method_is_physics_interpolated_and_enabled:
  1360. .. rst-class:: classref-method
  1361. :ref:`bool<class_bool>` **is_physics_interpolated_and_enabled**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_physics_interpolated_and_enabled>`
  1362. Returns ``true`` if physics interpolation is enabled (see :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>`) **and** enabled in the :ref:`SceneTree<class_SceneTree>`.
  1363. This is a convenience version of :ref:`is_physics_interpolated<class_Node_method_is_physics_interpolated>` that also checks whether physics interpolation is enabled globally.
  1364. See :ref:`SceneTree.physics_interpolation<class_SceneTree_property_physics_interpolation>` and :ref:`ProjectSettings.physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>`.
  1365. .. rst-class:: classref-item-separator
  1366. ----
  1367. .. _class_Node_method_is_physics_processing:
  1368. .. rst-class:: classref-method
  1369. :ref:`bool<class_bool>` **is_physics_processing**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_physics_processing>`
  1370. Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process<class_Node_method_set_physics_process>`).
  1371. .. rst-class:: classref-item-separator
  1372. ----
  1373. .. _class_Node_method_is_physics_processing_internal:
  1374. .. rst-class:: classref-method
  1375. :ref:`bool<class_bool>` **is_physics_processing_internal**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_physics_processing_internal>`
  1376. Returns ``true`` if internal physics processing is enabled (see :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`).
  1377. .. rst-class:: classref-item-separator
  1378. ----
  1379. .. _class_Node_method_is_processing:
  1380. .. rst-class:: classref-method
  1381. :ref:`bool<class_bool>` **is_processing**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_processing>`
  1382. Returns ``true`` if processing is enabled (see :ref:`set_process<class_Node_method_set_process>`).
  1383. .. rst-class:: classref-item-separator
  1384. ----
  1385. .. _class_Node_method_is_processing_input:
  1386. .. rst-class:: classref-method
  1387. :ref:`bool<class_bool>` **is_processing_input**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_processing_input>`
  1388. Returns ``true`` if the node is processing input (see :ref:`set_process_input<class_Node_method_set_process_input>`).
  1389. .. rst-class:: classref-item-separator
  1390. ----
  1391. .. _class_Node_method_is_processing_internal:
  1392. .. rst-class:: classref-method
  1393. :ref:`bool<class_bool>` **is_processing_internal**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_processing_internal>`
  1394. Returns ``true`` if internal processing is enabled (see :ref:`set_process_internal<class_Node_method_set_process_internal>`).
  1395. .. rst-class:: classref-item-separator
  1396. ----
  1397. .. _class_Node_method_is_processing_shortcut_input:
  1398. .. rst-class:: classref-method
  1399. :ref:`bool<class_bool>` **is_processing_shortcut_input**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_processing_shortcut_input>`
  1400. Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>`).
  1401. .. rst-class:: classref-item-separator
  1402. ----
  1403. .. _class_Node_method_is_processing_unhandled_input:
  1404. .. rst-class:: classref-method
  1405. :ref:`bool<class_bool>` **is_processing_unhandled_input**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_processing_unhandled_input>`
  1406. Returns ``true`` if the node is processing unhandled input (see :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`).
  1407. .. rst-class:: classref-item-separator
  1408. ----
  1409. .. _class_Node_method_is_processing_unhandled_key_input:
  1410. .. rst-class:: classref-method
  1411. :ref:`bool<class_bool>` **is_processing_unhandled_key_input**\ (\ ) |const| :ref:`๐Ÿ”—<class_Node_method_is_processing_unhandled_key_input>`
  1412. 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>`).
  1413. .. rst-class:: classref-item-separator
  1414. ----
  1415. .. _class_Node_method_move_child:
  1416. .. rst-class:: classref-method
  1417. |void| **move_child**\ (\ child_node\: :ref:`Node<class_Node>`, to_index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_Node_method_move_child>`
  1418. Moves ``child_node`` to the given index. A node's index is the order among its siblings. If ``to_index`` is negative, the index is counted from the end of the list. See also :ref:`get_child<class_Node_method_get_child>` and :ref:`get_index<class_Node_method_get_index>`.
  1419. \ **Note:** The processing order of several engine callbacks (:ref:`_ready<class_Node_private_method__ready>`, :ref:`_process<class_Node_private_method__process>`, etc.) and notifications sent through :ref:`propagate_notification<class_Node_method_propagate_notification>` is affected by tree order. :ref:`CanvasItem<class_CanvasItem>` nodes are also rendered in tree order. See also :ref:`process_priority<class_Node_property_process_priority>`.
  1420. .. rst-class:: classref-item-separator
  1421. ----
  1422. .. _class_Node_method_notify_deferred_thread_group:
  1423. .. rst-class:: classref-method
  1424. |void| **notify_deferred_thread_group**\ (\ what\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_Node_method_notify_deferred_thread_group>`
  1425. Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`, but for notifications.
  1426. .. rst-class:: classref-item-separator
  1427. ----
  1428. .. _class_Node_method_notify_thread_safe:
  1429. .. rst-class:: classref-method
  1430. |void| **notify_thread_safe**\ (\ what\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_Node_method_notify_thread_safe>`
  1431. Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for notifications.
  1432. .. rst-class:: classref-item-separator
  1433. ----
  1434. .. _class_Node_method_print_orphan_nodes:
  1435. .. rst-class:: classref-method
  1436. |void| **print_orphan_nodes**\ (\ ) |static| :ref:`๐Ÿ”—<class_Node_method_print_orphan_nodes>`
  1437. Prints all orphan nodes (nodes outside the :ref:`SceneTree<class_SceneTree>`). Useful for debugging.
  1438. \ **Note:** This method only works in debug builds. Does nothing in a project exported in release mode.
  1439. .. rst-class:: classref-item-separator
  1440. ----
  1441. .. _class_Node_method_print_tree:
  1442. .. rst-class:: classref-method
  1443. |void| **print_tree**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_print_tree>`
  1444. Prints the node and its children to the console, recursively. The node does not have to be inside the tree. This method outputs :ref:`NodePath<class_NodePath>`\ s relative to this node, and is good for copy/pasting into :ref:`get_node<class_Node_method_get_node>`. See also :ref:`print_tree_pretty<class_Node_method_print_tree_pretty>`.
  1445. May print, for example:
  1446. .. code:: text
  1447. .
  1448. Menu
  1449. Menu/Label
  1450. Menu/Camera2D
  1451. SplashScreen
  1452. SplashScreen/Camera2D
  1453. .. rst-class:: classref-item-separator
  1454. ----
  1455. .. _class_Node_method_print_tree_pretty:
  1456. .. rst-class:: classref-method
  1457. |void| **print_tree_pretty**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_print_tree_pretty>`
  1458. Prints the node and its children to the console, recursively. The node does not have to be inside the tree. Similar to :ref:`print_tree<class_Node_method_print_tree>`, but the graphical representation looks like what is displayed in the editor's Scene dock. It is useful for inspecting larger trees.
  1459. May print, for example:
  1460. .. code:: text
  1461. โ”–โ•ดTheGame
  1462. โ” โ•ดMenu
  1463. โ”ƒ โ” โ•ดLabel
  1464. โ”ƒ โ”–โ•ดCamera2D
  1465. โ”–โ•ดSplashScreen
  1466. โ”–โ•ดCamera2D
  1467. .. rst-class:: classref-item-separator
  1468. ----
  1469. .. _class_Node_method_propagate_call:
  1470. .. rst-class:: classref-method
  1471. |void| **propagate_call**\ (\ method\: :ref:`StringName<class_StringName>`, args\: :ref:`Array<class_Array>` = [], parent_first\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_Node_method_propagate_call>`
  1472. Calls the given ``method`` name, passing ``args`` as arguments, on this node and all of its children, recursively.
  1473. If ``parent_first`` is ``true``, the method is called on this node first, then on all of its children. If ``false``, the children's methods are called first.
  1474. .. rst-class:: classref-item-separator
  1475. ----
  1476. .. _class_Node_method_propagate_notification:
  1477. .. rst-class:: classref-method
  1478. |void| **propagate_notification**\ (\ what\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_Node_method_propagate_notification>`
  1479. Calls :ref:`Object.notification<class_Object_method_notification>` with ``what`` on this node and all of its children, recursively.
  1480. .. rst-class:: classref-item-separator
  1481. ----
  1482. .. _class_Node_method_queue_free:
  1483. .. rst-class:: classref-method
  1484. |void| **queue_free**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_queue_free>`
  1485. Queues this node to be deleted at the end of the current frame. When deleted, all of its children are deleted as well, and all references to the node and its children become invalid.
  1486. Unlike with :ref:`Object.free<class_Object_method_free>`, the node is not deleted instantly, and it can still be accessed before deletion. It is also safe to call :ref:`queue_free<class_Node_method_queue_free>` multiple times. Use :ref:`Object.is_queued_for_deletion<class_Object_method_is_queued_for_deletion>` to check if the node will be deleted at the end of the frame.
  1487. \ **Note:** The node will only be freed after all other deferred calls are finished. Using this method is not always the same as calling :ref:`Object.free<class_Object_method_free>` through :ref:`Object.call_deferred<class_Object_method_call_deferred>`.
  1488. .. rst-class:: classref-item-separator
  1489. ----
  1490. .. _class_Node_method_remove_child:
  1491. .. rst-class:: classref-method
  1492. |void| **remove_child**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_Node_method_remove_child>`
  1493. Removes a child ``node``. The ``node``, along with its children, are **not** deleted. To delete a node, see :ref:`queue_free<class_Node_method_queue_free>`.
  1494. \ **Note:** When this node is inside the tree, this method sets the :ref:`owner<class_Node_property_owner>` of the removed ``node`` (or its descendants) to ``null``, if their :ref:`owner<class_Node_property_owner>` is no longer an ancestor (see :ref:`is_ancestor_of<class_Node_method_is_ancestor_of>`).
  1495. .. rst-class:: classref-item-separator
  1496. ----
  1497. .. _class_Node_method_remove_from_group:
  1498. .. rst-class:: classref-method
  1499. |void| **remove_from_group**\ (\ group\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_Node_method_remove_from_group>`
  1500. Removes the node from the given ``group``. Does nothing if the node is not in the ``group``. See also notes in the description, and the :ref:`SceneTree<class_SceneTree>`'s group methods.
  1501. .. rst-class:: classref-item-separator
  1502. ----
  1503. .. _class_Node_method_reparent:
  1504. .. rst-class:: classref-method
  1505. |void| **reparent**\ (\ new_parent\: :ref:`Node<class_Node>`, keep_global_transform\: :ref:`bool<class_bool>` = true\ ) :ref:`๐Ÿ”—<class_Node_method_reparent>`
  1506. Changes the parent of this **Node** to the ``new_parent``. The node needs to already have a parent. The node's :ref:`owner<class_Node_property_owner>` is preserved if its owner is still reachable from the new location (i.e., the node is still a descendant of the new parent after the operation).
  1507. 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).
  1508. .. rst-class:: classref-item-separator
  1509. ----
  1510. .. _class_Node_method_replace_by:
  1511. .. rst-class:: classref-method
  1512. |void| **replace_by**\ (\ node\: :ref:`Node<class_Node>`, keep_groups\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_Node_method_replace_by>`
  1513. Replaces this node by the given ``node``. All children of this node are moved to ``node``.
  1514. If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that the replaced node is in (see :ref:`add_to_group<class_Node_method_add_to_group>`).
  1515. \ **Warning:** The replaced node is removed from the tree, but it is **not** deleted. To prevent memory leaks, store a reference to the node in a variable, or use :ref:`Object.free<class_Object_method_free>`.
  1516. .. rst-class:: classref-item-separator
  1517. ----
  1518. .. _class_Node_method_request_ready:
  1519. .. rst-class:: classref-method
  1520. |void| **request_ready**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_request_ready>`
  1521. Requests :ref:`_ready<class_Node_private_method__ready>` to be called again the next time the node enters the tree. Does **not** immediately call :ref:`_ready<class_Node_private_method__ready>`.
  1522. \ **Note:** This method only affects the current node. If the node's children also need to request ready, this method needs to be called for each one of them. When the node and its children enter the tree again, the order of :ref:`_ready<class_Node_private_method__ready>` callbacks will be the same as normal.
  1523. .. rst-class:: classref-item-separator
  1524. ----
  1525. .. _class_Node_method_reset_physics_interpolation:
  1526. .. rst-class:: classref-method
  1527. |void| **reset_physics_interpolation**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_reset_physics_interpolation>`
  1528. When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick.
  1529. That glitch can be prevented by calling this method, which temporarily disables interpolation until the physics tick is complete.
  1530. The notification :ref:`NOTIFICATION_RESET_PHYSICS_INTERPOLATION<class_Node_constant_NOTIFICATION_RESET_PHYSICS_INTERPOLATION>` will be received by the node and all children recursively.
  1531. \ **Note:** This function should be called **after** moving the node, rather than before.
  1532. .. rst-class:: classref-item-separator
  1533. ----
  1534. .. _class_Node_method_rpc:
  1535. .. rst-class:: classref-method
  1536. :ref:`Error<enum_@GlobalScope_Error>` **rpc**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`๐Ÿ”—<class_Node_method_rpc>`
  1537. Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), sending additional 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 :ref:`name<class_Node_property_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>`). By default, methods are not exposed to RPCs.
  1538. May return :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the call is successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the arguments passed in the ``method`` do not match, :ref:`@GlobalScope.ERR_UNCONFIGURED<class_@GlobalScope_constant_ERR_UNCONFIGURED>` if the node's :ref:`multiplayer<class_Node_property_multiplayer>` cannot be fetched (such as when the node is not inside the tree), :ref:`@GlobalScope.ERR_CONNECTION_ERROR<class_@GlobalScope_constant_ERR_CONNECTION_ERROR>` if :ref:`multiplayer<class_Node_property_multiplayer>`'s connection is not available.
  1539. \ **Note:** You can only safely use RPCs on clients after you received the :ref:`MultiplayerAPI.connected_to_server<class_MultiplayerAPI_signal_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 :ref:`MultiplayerAPI.server_disconnected<class_MultiplayerAPI_signal_server_disconnected>` or by checking (``get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED``).
  1540. .. rst-class:: classref-item-separator
  1541. ----
  1542. .. _class_Node_method_rpc_config:
  1543. .. rst-class:: classref-method
  1544. |void| **rpc_config**\ (\ method\: :ref:`StringName<class_StringName>`, config\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_Node_method_rpc_config>`
  1545. Changes the RPC configuration for the given ``method``. ``config`` should either be ``null`` to disable the feature (as by default), or a :ref:`Dictionary<class_Dictionary>` containing the following entries:
  1546. - ``rpc_mode``: see :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>`;
  1547. - ``transfer_mode``: see :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`;
  1548. - ``call_local``: if ``true``, the method will also be called locally;
  1549. - ``channel``: an :ref:`int<class_int>` representing the channel to send the RPC on.
  1550. \ **Note:** In GDScript, this method corresponds to the :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>` annotation, with various parameters passed (``@rpc(any)``, ``@rpc(authority)``...). See also the :doc:`high-level multiplayer <../tutorials/networking/high_level_multiplayer>` tutorial.
  1551. .. rst-class:: classref-item-separator
  1552. ----
  1553. .. _class_Node_method_rpc_id:
  1554. .. rst-class:: classref-method
  1555. :ref:`Error<enum_@GlobalScope_Error>` **rpc_id**\ (\ peer_id\: :ref:`int<class_int>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`๐Ÿ”—<class_Node_method_rpc_id>`
  1556. 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>`).
  1557. May return :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the call is successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the arguments passed in the ``method`` do not match, :ref:`@GlobalScope.ERR_UNCONFIGURED<class_@GlobalScope_constant_ERR_UNCONFIGURED>` if the node's :ref:`multiplayer<class_Node_property_multiplayer>` cannot be fetched (such as when the node is not inside the tree), :ref:`@GlobalScope.ERR_CONNECTION_ERROR<class_@GlobalScope_constant_ERR_CONNECTION_ERROR>` if :ref:`multiplayer<class_Node_property_multiplayer>`'s connection is not available.
  1558. .. rst-class:: classref-item-separator
  1559. ----
  1560. .. _class_Node_method_set_deferred_thread_group:
  1561. .. rst-class:: classref-method
  1562. |void| **set_deferred_thread_group**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_deferred_thread_group>`
  1563. Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`, but for setting properties.
  1564. .. rst-class:: classref-item-separator
  1565. ----
  1566. .. _class_Node_method_set_display_folded:
  1567. .. rst-class:: classref-method
  1568. |void| **set_display_folded**\ (\ fold\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_display_folded>`
  1569. If set to ``true``, the node appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_displayed_folded<class_Node_method_is_displayed_folded>`.
  1570. .. rst-class:: classref-item-separator
  1571. ----
  1572. .. _class_Node_method_set_editable_instance:
  1573. .. rst-class:: classref-method
  1574. |void| **set_editable_instance**\ (\ node\: :ref:`Node<class_Node>`, is_editable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_editable_instance>`
  1575. Set to ``true`` to allow all nodes owned by ``node`` to be available, and editable, in the Scene dock, even if their :ref:`owner<class_Node_property_owner>` is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_editable_instance<class_Node_method_is_editable_instance>`.
  1576. .. rst-class:: classref-item-separator
  1577. ----
  1578. .. _class_Node_method_set_multiplayer_authority:
  1579. .. rst-class:: classref-method
  1580. |void| **set_multiplayer_authority**\ (\ id\: :ref:`int<class_int>`, recursive\: :ref:`bool<class_bool>` = true\ ) :ref:`๐Ÿ”—<class_Node_method_set_multiplayer_authority>`
  1581. 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. Defaults to peer ID 1 (the server). Useful in conjunction with :ref:`rpc_config<class_Node_method_rpc_config>` and the :ref:`MultiplayerAPI<class_MultiplayerAPI>`.
  1582. If ``recursive`` is ``true``, the given peer is recursively set as the authority for all children of this node.
  1583. \ **Warning:** This does **not** automatically replicate the new authority to other peers. It is the developer's responsibility to do so. You may replicate the new authority's information using :ref:`MultiplayerSpawner.spawn_function<class_MultiplayerSpawner_property_spawn_function>`, an RPC, or a :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`. Furthermore, the parent's authority does **not** propagate to newly added children.
  1584. .. rst-class:: classref-item-separator
  1585. ----
  1586. .. _class_Node_method_set_physics_process:
  1587. .. rst-class:: classref-method
  1588. |void| **set_physics_process**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_physics_process>`
  1589. If set to ``true``, enables physics (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 it exists).
  1590. \ **Note:** If :ref:`_physics_process<class_Node_private_method__physics_process>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called.
  1591. .. rst-class:: classref-item-separator
  1592. ----
  1593. .. _class_Node_method_set_physics_process_internal:
  1594. .. rst-class:: classref-method
  1595. |void| **set_physics_process_internal**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_physics_process_internal>`
  1596. If set to ``true``, enables 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>`).
  1597. \ **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing.
  1598. .. rst-class:: classref-item-separator
  1599. ----
  1600. .. _class_Node_method_set_process:
  1601. .. rst-class:: classref-method
  1602. |void| **set_process**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_process>`
  1603. If set to ``true``, enables 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 it exists).
  1604. \ **Note:** If :ref:`_process<class_Node_private_method__process>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called.
  1605. \ **Note:** This method only affects the :ref:`_process<class_Node_private_method__process>` callback, i.e. it has no effect on other callbacks like :ref:`_physics_process<class_Node_private_method__physics_process>`. If you want to disable all processing for the node, set :ref:`process_mode<class_Node_property_process_mode>` to :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
  1606. .. rst-class:: classref-item-separator
  1607. ----
  1608. .. _class_Node_method_set_process_input:
  1609. .. rst-class:: classref-method
  1610. |void| **set_process_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_process_input>`
  1611. If set to ``true``, enables input processing.
  1612. \ **Note:** If :ref:`_input<class_Node_private_method__input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. Input processing is also already enabled for GUI controls, such as :ref:`Button<class_Button>` and :ref:`TextEdit<class_TextEdit>`.
  1613. .. rst-class:: classref-item-separator
  1614. ----
  1615. .. _class_Node_method_set_process_internal:
  1616. .. rst-class:: classref-method
  1617. |void| **set_process_internal**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_process_internal>`
  1618. If set to ``true``, enables 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>`).
  1619. \ **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing.
  1620. .. rst-class:: classref-item-separator
  1621. ----
  1622. .. _class_Node_method_set_process_shortcut_input:
  1623. .. rst-class:: classref-method
  1624. |void| **set_process_shortcut_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_process_shortcut_input>`
  1625. If set to ``true``, enables shortcut processing for this node.
  1626. \ **Note:** If :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called.
  1627. .. rst-class:: classref-item-separator
  1628. ----
  1629. .. _class_Node_method_set_process_unhandled_input:
  1630. .. rst-class:: classref-method
  1631. |void| **set_process_unhandled_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_process_unhandled_input>`
  1632. If set to ``true``, enables unhandled input processing. It enables the node to receive all input that was not previously handled (usually by a :ref:`Control<class_Control>`).
  1633. \ **Note:** If :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. Unhandled input processing is also already enabled for GUI controls, such as :ref:`Button<class_Button>` and :ref:`TextEdit<class_TextEdit>`.
  1634. .. rst-class:: classref-item-separator
  1635. ----
  1636. .. _class_Node_method_set_process_unhandled_key_input:
  1637. .. rst-class:: classref-method
  1638. |void| **set_process_unhandled_key_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_process_unhandled_key_input>`
  1639. If set to ``true``, enables unhandled key input processing.
  1640. \ **Note:** If :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called.
  1641. .. rst-class:: classref-item-separator
  1642. ----
  1643. .. _class_Node_method_set_scene_instance_load_placeholder:
  1644. .. rst-class:: classref-method
  1645. |void| **set_scene_instance_load_placeholder**\ (\ load_placeholder\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_scene_instance_load_placeholder>`
  1646. If set to ``true``, the node becomes a :ref:`InstancePlaceholder<class_InstancePlaceholder>` when packed and instantiated from a :ref:`PackedScene<class_PackedScene>`. See also :ref:`get_scene_instance_load_placeholder<class_Node_method_get_scene_instance_load_placeholder>`.
  1647. .. rst-class:: classref-item-separator
  1648. ----
  1649. .. _class_Node_method_set_thread_safe:
  1650. .. rst-class:: classref-method
  1651. |void| **set_thread_safe**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_Node_method_set_thread_safe>`
  1652. Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for setting properties.
  1653. .. rst-class:: classref-item-separator
  1654. ----
  1655. .. _class_Node_method_update_configuration_warnings:
  1656. .. rst-class:: classref-method
  1657. |void| **update_configuration_warnings**\ (\ ) :ref:`๐Ÿ”—<class_Node_method_update_configuration_warnings>`
  1658. Refreshes the warnings displayed for this node in the Scene dock. Use :ref:`_get_configuration_warnings<class_Node_private_method__get_configuration_warnings>` to customize the warning messages to display.
  1659. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1660. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1661. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1662. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1663. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1664. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1665. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1666. .. |void| replace:: :abbr:`void (No return value.)`