I'm currently writing the code with C++ Godot bindings to manage my main menu GUI and I felt free to declare pointers to some of my GUI scene nodes in the header file ; I then declared them in the Godot-inherited _init function.
// Define pointers
m_mainMenuAnimator = get_node<AnimationPlayer>("quickMenu_Animator");
m_bgmPlayer = get_node<AudioStreamPlayer>("BGMPlayer");
m_sfxPlayer = get_node<AudioStreamPlayer>("SFXPlayer");
m_mainMenuBtn_Lay = get_node<HBoxContainer>("menuBtn_Lay");
m_newGame_Btn = get_node<Button>("menu_Pnl/menuBtn_Lay/newGame_Btn");
m_loadGame_Btn = get_node<Button>("loadGame_Btn");
m_options_Btn = get_node<Button>("options_Btn");
m_credits_Btn = get_node<Button>("credits_Btn");
m_quitGame_Btn = get_node<Button>("quit_Btn");
But strangely, when I playtest the game and try to get any interaction wth the buttons, nothing works. After looking into the debugger, I find these errors:
Godot just doesn't find any node I tried to define in my _init function. I tried to use another way to write the node paths, but nothing works : it seems like Godot is actually unable to interpret them.
Is there a way to get quickly out of this problem? Thanks in advance.