Nodes Aren't Inheriting at Two Levels

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jelly

I am not getting node inheritance at two levels of depth. I have MenuBase > MenuBaseFull and then HelpMenu inheriting from MenuBaseFull. Changes I make in MenuBase, the top most node class, go down to MenuBaseFull but not HelpMenu. So the child of the base gets changes but not the second.

Is this recognized by anyone?

:bust_in_silhouette: Reply From: Lopy

Multilevel inheritance works, although you might have found an edge case to it.

A pretty unintuitive behavior with inheritance, is that when inheriting most builtin function, like _init, Godot will still call the parent’s definition of it on top of the child’s (bad). However, when inheriting regular functions, this is not the case and functions supersede one another (although you can still call parent ones using a dot before the function). I suppose that might be the cause of your issue?

Please include relevant parts of your program when asking questions, using the buttons or by pasting them with an extra level of indentation.