LIGHTHOUSE – QUICK START

Mixed Reality applications increasingly require the implementation of a collaborative mode where the various participants can interact with one another.
The goal of this document is to describe the ways in which this collaboration functions, as well as its architecture.

1. Create a new UWP Unity Project

2. Add “Client/Libs/Unity” files into the project

a. UWP dll should have “WSAPlayer” as only target

b. Create a script named “CollaborationManager” :

– Import this:
Copy to Clipboard
– Create two client properties: server address and name
Copy to Clipboard
– Create an asynchronous function for the client connection
Copy to Clipboard

– Create a function to initialize the shared properties, if they already exist online it can be a good idea to retrieve them.

Example:

Copy to Clipboard
Copy to Clipboard

– Once the property is shared, handle the event trigger when a property is updated on the server.

Example:

Copy to Clipboard

– It is important to understand that when you get a shared property value from a notification, it is executed on a different thread than the Unity main one.
This is why we need to pass the value through the Unity Update thread.

Example:

Copy to Clipboard

ANY TROUBLE?

MAYBE WE CAN HELP

SEE THE FAQ