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)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.