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

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

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