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
);
void PrepareRoom(ISharedSpaceRoomOptions roomOptions);
void LeaveRoom();
SharedAROrigin CreateSharedOrigin(ARPersistentAnchor anchor);
void DestroySharedArOrigin();
};
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
PrepareRoom
void PrepareRoom(ISharedSpaceRoomOptions roomOptions)
Prepare a Lightship networking Room for Netcode
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
roomOptions
- Room settings
LeaveRoom
void LeaveRoom()
Disconnect from the Lightship networking Room
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
CreateSharedOrigin
SharedAROrigin CreateSharedOrigin(ARPersistentAnchor anchor)
Create a shared AR origin object under the given persistent anchor.
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
anchor
- A parent ARPersistentAnchor for the shared AR origin
Returns:
SharedAROrigin object created
DestroySharedArOrigin
void DestroySharedArOrigin()
Destroy the shared AR origin
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice