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 AwaitAnySpaceConnection(Action<CavrnusSpaceConnection> onConnected)

- Description

Triggers immediately if you are already in a space, otherwise triggers as soon as you connect

- Sample

using CavrnusSdk.API;
using UnityEngine;

public class SpaceUiSpawner : MonoBehaviour
{
    public GameObject SpaceMenuPrefab;

    // Start is called before the first frame update
    void Start()
    {
        CavrnusFunctionLibrary.AwaitAnySpaceConnection(spaceConn => GameObject.Instantiate(SpaceMenuPrefab));
    }
}
  • No labels