Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

- 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

Code Block
languagec#
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));
    }
}