Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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.

  1. Add an instance of the CavrnusSpatialConnector to your level by selecting it from the Cavrnus menu at the top of the Unreal Editor interface.

image-20240417-164715.png

  1. Select the CavrnusSpatialConnector instance in the level Outliner.

image-20240417-164812.png

  1. From the Details panel, configure all of your connection settings for this project:

image-20240417-164916.png

CSC Configuration

  • My Server:

This is the domain you registered with Cavrnus when you configured your account. Enter your company’s URL in this field. (e.g. “CompanyName.cavrn.us” )

  • Authentication Method:

Specify whether Guests can join a space anonymously using a hyperlink, or if a login is required by a an authorized team member in your domain.

AuthenticationMethod.png

Guests can join automatically with no authentication. This is recommended for delivering an experience to a wide audience, without the need for creating and managing a large number of temporary accounts.

Guests can only join spaces which have been configured to allow guests to join. (See Creating and Managing Spaces). They can only access them through a hyperlink that has been provided to them. These accounts have a limited lifespan and will be deleted after the duration expires.

Guest Login Method: Select a method to identify the Guest user with a name while in the Space.

GuestLoginMethod.png

By selecting “Enter Name Below”, you can specify a name directly that will apply to all guests in the Space.

image-20240417-171440.png

Select “Prompt to Enter Name” to trigger a prompt when the Guest first enters the space. Note that this requires a Blueprint Widget to be selected as the prompt that will display. A default widget is provided with the Cavrnus Plugin files, but you can also create your own custom design.

image-20240417-171817.png

Guest Logic is only available on the Cavrnus Dev Servers at the moment. It is coming to production shortly as described above.

Members are authorized users who have login credential on your domain. This method is recommended for controlling access to private or sensitive information.

Member accounts are persistent, and can either be given access to all Spaces, or to specific Spaces individually. When selecting “Join as Member”, there are two options for entering login credentials.

image-20240417-173000.png

Select “Prompt to Enter Name” to trigger a prompt when the Guest first enters the space. Note that this requires a Blueprint Widget to be selected as the prompt that will display. A default widget is provided with the Cavrnus Plugin files, but you can also create your own custom design.

image-20240417-172430.png

Using this method While this option is useful for automated testing and for delivering bespoke applications to individuals. However, it involves adding your password in plain text to your project so be mindful when, say, committing these credentials to a public git repo.

image-20240208-194735.png

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.

image-20240208-194940.png

We also give you the option to save your Authentication Token locally on your device.

image-20240208-210529.png

Joining a Space

If you have not yet created a Space for your users to join, you can find the steps to do so here: /wiki/spaces/IKB/pages/815269529

Once a User is authenticated, you can immediately place them inside a pre-defined Space. To do this, select Automatic as your Space Join Method. You must then get the ID of the Space you wish them to join.

This ID can be fetched in the Web Console by clicking the “…” next to your Space and Copying the ID.

image-20240223-101515.png
image-20240223-101503.png

You can then Paste it into the given field.

image-20240208-211216.png

Alternatively you can simply present Users with a list of all the spaces they are currently allowed to join and let them pick one. As before, you can customize this UI as you see fit.

image-20240208-211355.png

Note: A Cavrnus Space will often be filled with Properties pointing to specific paths within your application. Therefore, allowing users to just open any Space could result in them bringing down a Journal that is meant to be for a different application.

Example: One of your users has access to a Car Configurator Application which connects to the “Car Config” Space. They also have access to a Conference Room Application. Allowing them to join the “Car Config” Space from the Conference Room Application would give them a bunch of car-related Properties which their Application wouldn’t know what to do with.

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.

image-20240208-212150.png

Avatars and Co-Presence

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, at a minimum, have a SyncTransform script on it or some other way of Binding/handling the “transform” Property to show the User’s movement. The Unique Container Name can be left blank though, because it will be automatically filled in by our systems for each individual user when spawned. These avatars can also send & receive any other custom properties you want (User Color, Left Elbow Transform, etc).

image-20240208-212804.png

To use a customized Avatar, simply drag & drop it into the Cavrnus Spatial Connector.

image-20240208-213138.png

To send your Co-Presence to other users, select the Local User’s rig and hit Cavrnus->Set Selected Object As Local User.

image-20240208-213238.png

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 to the Spawnable Objects list at the bottom of the Cavrnus Spatial Connector. We offer a shortcut for this where you can right-click on the Prefab and select Cavrnus->Make Selection Spawnable.

image-20240208-235757.png

The Unique Id is what is stored in the Journal as the thing being spawned. 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.

image-20240209-010253.png

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 our No-Code Collaboration Components to automatically synchronize an object's Properties.

Alternatively, you can read up on more advanced techniques in our Developer Guide, or make calls directly using our API Reference.

  • No labels