You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
Error
The example says to use that line in order to set the
DebugMenu
But this error happens.
Invalid get index 'Style' (on base: 'CanvasLayer').
Cause
It stunned me because the script
debug_menu.gd
extendsControl
, notCanvasLayer
. But I realized that the instantiated autoload is the scene, not the script. And the root node of the scene is aCanvasLayer
.The text was updated successfully, but these errors were encountered: