0 votes

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?

in Engine by (56 points)

1 Answer

0 votes

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.

by (2,478 points)
