Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to modify DebugMenu.style through code #21

Closed
adamscott opened this issue Dec 15, 2023 · 1 comment
Closed

Error when trying to modify DebugMenu.style through code #21

adamscott opened this issue Dec 15, 2023 · 1 comment

Comments

@adamscott
Copy link

Error

The example says to use that line in order to set the DebugMenu

DebugMenu.style = DebugMenu.Style.VISIBLE_DETAILED

But this error happens.

Invalid get index 'Style' (on base: 'CanvasLayer').

Cause

It stunned me because the script debug_menu.gd extends Control, not CanvasLayer. But I realized that the instantiated autoload is the scene, not the script. And the root node of the scene is a CanvasLayer.

@adamscott adamscott changed the title Error when trying to modify DebugMenu.style through code. Error when trying to modify DebugMenu.style through code Dec 15, 2023
@Calinou
Copy link
Member

Calinou commented Dec 15, 2023

Thanks for the report! Consolidating in #15, which was fixed by #16 but isn't present in a tagged release yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants