Functions Reference
Godot 4 · GDScript · Setup & session
has_connectivity
True if the last connectivity probe to the server succeeded.
Synchronous (returns directly)
Signature
has_connectivity() -> boolWhat it does
The plugin probes the server every 60 seconds. This returns the result of the latest probe (false until the first probe completes, or after a network failure).
Parameters
This function takes no parameters.
How to call it
Read it any time; listen to connectivity_changed to react to transitions.
Returns: bool
Example
Gamdato.connectivity_changed.connect(func(online: bool) -> void:
offline_banner.visible = not online)Use cases
- Show or hide an 'offline' banner.
- Disable buttons that need the network when there is no connection.