Skip to main content
Version: 3.3

class SharedSpaceManager

(Niantic.Lightship.SharedAR.Colocalization.SharedSpaceManager)

Overview

The SharedSpaceManager manages to set up necessary components for colocalization. The SharedSpaceManager hides complexity in setting up colocalization related object hierarchy and networking room associated to the tracking target.

    class SharedSpaceManager: MonoBehaviour {
public:

enumColocalizationType;


struct SharedSpaceManagerStateChangeEventArgs;

// properties

GameObject SharedArOriginObject;
ISharedSpaceTrackingOptions SharedSpaceTrackingOptions;
ISharedSpaceRoomOptions SharedSpaceRoomOptions;

// events

event sharedSpaceManagerStateChanged();

// methods

ColocalizationType GetColocalizationType();

void StartSharedSpace(
ISharedSpaceTrackingOptions trackingOptions,
ISharedSpaceRoomOptions roomOptions
);
};

Detailed Documentation

The SharedSpaceManager manages to set up necessary components for colocalization. The SharedSpaceManager hides complexity in setting up colocalization related object hierarchy and networking room associated to the tracking target.

Properties

SharedArOriginObject

GameObject SharedArOriginObject

Reference to the GameObject representing shared origin/root

SharedSpaceTrackingOptions

ISharedSpaceTrackingOptions SharedSpaceTrackingOptions

Getting currently active ISharedSpaceTrackingOptions set in the SharedSpaceManager

SharedSpaceRoomOptions

ISharedSpaceRoomOptions SharedSpaceRoomOptions

Getting currently active ISharedSpaceRoomOptions set in the SharedSpaceManager

Events

sharedSpaceManagerStateChanged

event sharedSpaceManagerStateChanged()

An event invoked when state colocalization related state changed. At the moment, only invoked when underlying tracking state changed

Methods

GetColocalizationType

ColocalizationType GetColocalizationType()

Get the ColocalizationType

    Returns:

    Colocalization type set on the SharedSpaceManager

StartSharedSpace

void StartSharedSpace(
ISharedSpaceTrackingOptions trackingOptions,
ISharedSpaceRoomOptions roomOptions
)

Start tracking and prepare a Room.

    Parameters:

    trackingOptions - Tracking settings

    roomOptions - Room settings