JoinSpace (Unity)

- Declaration

public static void JoinSpace(string spaceId, Action<CavrnusSpaceConnection> onConnected, Action<string> onFailure)

- Description

Connects to a Space.

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) { CavrnusFunctionLibrary.JoinSpace(space.Id, spaceConn => Debug.Log("Successfully Joined: " + space.Name), err => Debug.LogError("Failed to join space: " + err)); } }

Related pages