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 Next »

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

    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();
    }
}
  • No labels