We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to call an async function without "await".
My code:
extends BoxContainer signal change_tab(new_tab: String, ) var navbar_store = R.store({ # or R.state({ ... }) "current_tab": "menu_home", # NOTE: This needs to be the button name. "hide_tabs": false }) var debounce = false # Called when the node enters the scene tree for the first time. func _ready(): $"../PlayerInfo/TextureProgressBar/PlayerName".text = NakamaConnection.session.username if NakamaConnection.session else 'USERNAME' R.effect(_on_tab_change) for node in get_children(): # BUTTONS BLACKLIST if !node is Button: continue if node.name in ['TouchArena']: continue node.pressed.connect(func(): if debounce: return; debounce = true navbar_store.current_tab = node.name await get_tree().create_timer(.3).timeout debounce = false ) func _on_touch_arena_pressed(): SceneManager.switch_scene('touch_arena') func _on_tab_change(_ignore): for node in get_children(): if !node is Button: continue if node.name == navbar_store.current_tab: node.disabled = true continue node.disabled = false debounce = true var component = await SceneManager.swap_node( $"../../SectionContainer".get_child(0), navbar_store.current_tab, true ) if component and component.instantiated_scene: var component_node: Node = component.instantiated_scene if component_node.has_user_signal('change_tab'): var change_tab_array: Array = component_node.get_signal_connection_list('change_tab') if len(change_tab_array)>0: component_node.disconnect('change_tab', change_tab_array[0].callable) component_node.connect('change_tab', func(tab_name, hide_tabs): print(tab_name, hide_tabs) ) debounce = false
The text was updated successfully, but these errors were encountered:
If someone read this, I solved it using another func inside .effect callable to do async things
Sorry, something went wrong.
No branches or pull requests
Trying to call an async function without "await".
My code:
The text was updated successfully, but these errors were encountered: