godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

Add a mention of multilevel call removal in Godot 3 -> 4 transition guide (for _ready(), _process(), _enter_tree(), etc.)

Open dreadpon opened this issue 2 years ago • 1 comments

Your Godot version: Godot 4.0 docs

Issue description: While converting my project from 3.5 I discovered that _ready() call was not triggered on my base class. After digging in Godot issues a bit, I eventually found a commit that removes these calls and makes built-in functions obey the traditional inheritance laws (thus requiring a super() calls.

https://github.com/godotengine/godot/pull/40670/commits/2b9d9bc3644de19b291c16b2facc418f3d64d4fc

I think the docs on upgrading from Godot 3 to Godot 4 need to mention this, since in big inheritance chains multilevel calls were most definitely an important architectural feature.

Judging from the commit above, I assume the following functions were were affected:

  • _notification
  • _enter_world
  • _exit_world
  • _draw
  • _process
  • _physics_process
  • _ready
  • _enter_tree
  • _exit_tree
  • _gui_input

Am I forgetting something? Would be great if someone from the core team could provide an exact list.

URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/tutorials/migrating/upgrading_to_godot_4.html

dreadpon avatar May 09 '23 09:05 dreadpon

i'd also like to note that _enter_world and _exit_world aren't currently documented at all as far as the docs search function can tell me, the only mentions of that substring in the results is the NOTIFICATION_* on Node3D. (and this is the only issue i could find mentioning them, so i figured it might be worth doing both in one go, but i can also just make a new issue if you feel it's not related here?)

nonchip avatar May 26 '24 08:05 nonchip