Indicates status of network connection availability


Here is everything needed to use the Connectivity feature in the "Beamable SDK for Unity".

The purpose of this feature is to indicates the status of network connection availability.

The system monitors internet connectivity and updates automatically if any changes occur; including remote server outtages or loss of local ethernet/wifi internet.


Unlike many Beamable FeatureFeature - An individual aspect of the Beamable product used to create a great user experiences, Connectivity does not require a specific Beamable Feature PrefabFeature Prefab - The drag-and-drop template for a specific Beamable product feature to be used. The main entry point to this feature is C# programming.

Here are API highlights for beamableAPI.ConnectivityService.

Note: This API is demonstrated in the ConnectivityServiceExample.cs below.

Method Name



Getter. Determines if the app has internet connectivity


Setter. Determines if the app has internet connectivity

Note: Calling this is not required. The Beamable system will properly monitor connectivity and update the ConnectivityService.


Here are examples which cover common programming needs.


Beamable SDK Examples

This and all examples are available for download at

In this ConnectivityServiceExample.cs, the UI shows the current state of the internet connectivity and updates automatically if any changes occur (ex. if the ethernet / wifi is manually disabled or enabled by the user).

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

namespace Beamable.Examples.Services.ConnectivityService
    /// <summary>
    /// Holds data for use in the <see cref="ConnectivityServiceExampleUI"/>.
    /// </summary>
    public class ConnectivityServiceExampleData
        public List<string> OutputLogs = new List<string>();
        public bool HasConnectivity = false;
    public class RefreshedUnityEvent : UnityEvent<ConnectivityServiceExampleData> { }
    /// <summary>
    /// Demonstrates <see cref="ConnectivityService"/>.
    /// </summary>
    public class ConnectivityServiceExample : MonoBehaviour
        //  Events  ---------------------------------------
        public RefreshedUnityEvent OnRefreshed = new RefreshedUnityEvent();
        //  Fields  ---------------------------------------
        private IBeamableAPI _beamableAPI = null;
        private ConnectivityServiceExampleData _data = new ConnectivityServiceExampleData();
        //  Unity Methods  --------------------------------
        protected void Start()
            Debug.Log($"Start() Instructions...\n" +
                      " * Ensure Computer's Internet Is Active\n" +
                      " * Run The Scene\n" +
                      " * See Onscreen UI Show HasInternet = true\n" +
                      " * Ensure Computer's Internet Is NOT Active\n" +
                      " * See Onscreen UI Show HasInternet = false\n");

        //  Methods  --------------------------------------
        private async void SetupBeamable()
            _beamableAPI = await Beamable.API.Instance;

            Debug.Log($" = {}");

            // Observe ConnectivityService Changes
            _beamableAPI.ConnectivityService.OnConnectivityChanged += ConnectivityService_OnConnectivityChanged;
            // Update UI Immediately
            bool hasConnectivity = _beamableAPI.ConnectivityService.HasConnectivity;
        public void ToggleHasInternet()

        public void Refresh()
            string refreshLog = $"Refresh() ..." +
                                $"\n * HasInternet = {_data.HasConnectivity}" + 
                                $"\n * OutputLogs = {_data.OutputLogs.Count}\n\n";
            // Send relevant data to the UI for rendering
        //  Event Handlers  -------------------------------
        private void ConnectivityService_OnConnectivityChanged(bool hasConnectivity)
            _data.HasConnectivity = hasConnectivity;
            _data.OutputLogs.Add($"HasConnectivity = {_data.HasConnectivity}");


This section contains any advanced configuration options and workflows.

Did this page help you?