- 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); } }