- Declaration
public static void ExitSpace(this CavrnusSpaceConnection spaceConn)
- Description
Disconnects you from a given space. You will stop receiving property updates, and lose user & voice connections.
- Sample
using CavrnusSdk.API; using UnityEngine; public class ExitSpaceButton : MonoBehaviour { private CavrnusSpaceConnection spaceConn; // Start is called before the first frame update void Start() { CavrnusFunctionLibrary.AwaitAnySpaceConnection(spaceConn => this.spaceConn = spaceConn); } public void ExecuteExitSpace() { if(spaceConn == null) { Debug.LogError("Not yet in a space that can be exited"); return; } spaceConn.ExitSpace(); } }