Connect Your Level (Unreal Engine)

Once the Cavrnus Spatial Connector plugin is enabled, you must define the connection of the project to your domain.

  1. Insert the CavrnusSpatialConnector actor in the level.

  2. Manually implement calls to the Cavrnus API Functions.

Insert the CavrnusSpatialConnector actor

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. In the level Outliner, select the CavrnusSpatialConnector instance.

image-20240417-164812.png

 

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

 

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 an authorized team member in your domain.

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).

  • Guests can only access a Space through a hyperlink that has been provided to them.

  • These “guest accounts” can be used by multiple people simultaneously, but they do 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.

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

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.

Guest Login 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.

 

Member Login Method: Select a method to identify the user as a Member with login credentials to verify access permissions to a Space.

Select “Prompt Member to Login” to trigger a prompt when the team member 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.

 

This method is useful for automated testing and for delivering bespoke applications to specific individuals. However, be mindful as this involves adding your password in plain text to your project.

 

Remember to delete login credentials from the CSC component when committing a project to a public Git repo! If you accidentally push your login password to a public Git, be sure to change your password immediately.

 

Space Join Method:

If you have not yet created a Space for your users to join, create one now.

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 copied by clicking on the Join ID at the bottom of the Space thumbnail in the Spaces section of the Cavrnus Management Console.

 

You can then Paste the Join ID into the given field.

 

Alternatively you can simply present Users with a list of all the spaces they are currently allowed to join and let them pick one. Select “Spaces List” to trigger a prompt when the team member 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.

 


 

Next Steps

That’s the only change required to your level in order to connect it to a Cavrnus Space.

Next, we’ll configure the Connector to add login credentials, and specify which to which Cavrnus Space the level should connect.

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