With the CSC plugin enabled, there are two ways to setup your scene.
Insert the CavrnusSpatialConnector actor in the level.
Manually implement calls to the Cavrnus API Functions.
CavrnusSpatialConnector class
The CavrnusSpatialConnector is a specialized actor class that collects all of the required configuration elements into one convenient location.
Add an instance of the CavrnusSpatialConnector to your level by selecting it from the Cavrnus menu at the top of the Unreal Editor interface.
Select the CavrnusSpatialConnector instance in the level Outliner.
From the Details panel, configure all of your connection settings for this project:
As with any Unreal plugin, adding the Cavrnus Spatial Connector is a simple 3 step process:
The more common way of getting Members into your Application is by spawning a Login Menu with Login Manual. This lets them type in their own credentials and log in as themselves. As before, you can redo the Login Menu as you see fit and spawn your version instead.
We also give you the option to save your Authentication Token locally on your device.
Joining a Space you can find the steps to do so here: /wiki/spaces/IKB/pages/815269529 fetched in the Web Console the “…” next to your Space and Copying the ID.Space UI
Once your users connect to a Space they may want to see some menus appear. The Cavrnus Spatial Connector allows you to specify which UI to show both while the Space is Loading and once it is ready. We provide a few defaults (a Loading graphic, a Users Menu, and a Voice/Video Menu) You can modify/replace these and add your own at will. Loading Menus will, of course, be destroyed once the Space is connected.Avatars in Cavrnus are driven by the same Properties logic that governs the rest of the Space. As such, any Avatar you want to use will need to script or some other way of Binding/handling the “transform” Property to show though, our systems These any you want (, , etc).To use a customized Avatar, simply drag & drop it into the Cavrnus Spatial Connector.
To send your Co-Presence to other users, select the Local User’s rig and hit Cavrnus->Set Selected Object As Local User.
This will automatically add a CavrnusLocalUserFlag to your character and a SyncTransform component to send your position across the wire. As with remote avatars you can send and receive as many custom properties as you would like. However, ensure that the Property Names match between the Local Rig and the Remote Avatar. If you are sending a property named “position” and their Remote User Avatar is listening for one named “transform”, you’re gonna have a bad time.
Spawnable Objects
If you want to spawn prefabs into your Scene at runtime, you will need to add them Cavrnus Spatial Connector. We offer a shortcut for this where you can right-click on the Prefab and select Cavrnus->Make Selection Spawnable. In theory, this means you could make changes to a prefab that already has Journal entries spawning its ID. This would mean anyone running with the new version of the application would see the new prefab get spawned in place of the old one.Next Steps
At this point, hitting Play in Unity should Authenticate the user and place them in a Space, with all of the relevant UI being spawned in with them!
Now you can start synchronizing the various things inside your project!
You can do this by adding ourTip |
---|
Next StepsYour level is now connected to a Cavrnus Space. If you run Play-In-Editor, the level will load into that space and you will be able to see the connection in the Session Analyzer. You’ll have Voice & Video capability, and see a user list with all of the other users in the Space. However, in the Session Analyzer you will only see the user logged in. You won’t see any property updates associated with your level. Next, we will add No-Code Collaboration Components to automatically synchronize an object's Properties. That way they can be synchronized across multiple connections. Alternatively, you can read up on more advanced techniques in our Developer Guide, or make calls directly using our API Reference. |