Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

- Declaration

public static void JoinSpaceWithOptions(string spaceId, SpaceConnectionConfig config, Action<CavrnusSpaceConnection> onConnected, Action<string> onFailure)

- Description

Connects to a Space using the provided SpaceConnectionConfig object.

onFailure will trigger if the user does not have proper authentication to join a space.

- Sample

using CavrnusSdk.API;
using UnityEngine;

public class JoinSpaceUiButton : MonoBehaviour
{
    public void JoinGivenSpace(CavrnusSpaceInfo space)
    {                               
        var config = new SpaceConnectionConfig {Tag = "rtcTag"};
            CavrnusFunctionLibrary.JoinSpaceWithOptions(space.Id, config,
            connectedMsg => { "Successfully joined: " + space.Name },
            err => "Failed to join space: " + err);
    }
}
  • No labels