API Reference - Unreal
Welcome to the Cavrnus Unreal Engine API Reference! This document is designed to help you harness the power of Cavrnus to create your own custom applications within Unreal Engine. While our Cavrnus No-Code solutions take care of all of the details automatically, you can also leverage the Cavrnus API to tightly integrate collaboration in your own custom 3D application tools. The following pages will describe how the Cavrnus API provides the tools you need to build rich, interactive experiences in a seamless real-time collaboration environment.
Getting Started
This reference is organized into 2 sections:
Cavrnus Types
Detailed descriptions of the core Cavrnus data types, such as:
FCavrnusSpaceConnection: Represents a user's connection to a space.
FCavrnusAuthentication: Stores authentication tokens for user logins.
FCavrnusSpaceInfo: Provides information about a specific Cavrnus space.
FCavrnusUser: Represents an individual user within a space.
FCavrnusLiveXPropertyUpdate: Used for sending temporary property updates.
FCavrnusSpawnedObject: Represents an object spawned in a synchronized manner.
FCavrnusRemoteContent: Describes files uploaded to the Cavrnus server.
FCavrnusInputDevice, FCavrnusOutputDevice, FCavrnusVideoInputDevice: Represent audio and video devices for real-time communication.
Cavrnus Functions
Detailed descriptions of the primary public functions available in the Cavrnus API:
Authentication: Manage user logins and permissions.
Space Functions: Interact with Cavrnus spaces, including joining, exiting, and fetching information.
Property Functions: Synchronize and manipulate various property types (color, bool, float, string, vector, transform) in real-time.
Permissions: Control access and actions within spaces.
Spawned Objects: Create, manage, and destroy objects in the collaborative environment.
Remote Content: Upload, download, and access files stored on the Cavrnus server.
Space Users: Retrieve information about users within a space and track their presence.
Voice and Video: Manage audio and video streams for real-time communication.
Cavrnus Headers
In addition, you’ll find general descriptions of the various public headers in the Cavrnus source files, organized by functional groups:
Public Core: Defines the core structure and functionality of the Cavrnus Spatial Connector plugin for Unreal Engine.
Live Property Updates: Define classes designed to handle real-time updates of different property types within the Cavrnus collaborative environment.
Value Syncs: Form a structured system for synchronizing property values between Unreal Engine and the Cavrnus platform.
Types: Essential data structures used throughout the Cavrnus Spatial Connector plugin.
Flag Components: Components that play a role in identifying and tracking entities for collaboration (users, avatars, spawned objects).
UI: Define the core functionality of the user interface (UI) elements for a Cavrnus Space, including Pagination and Space Lists.
Important Notes
Work in Progress: This API reference is a work in progress. While we strive for accuracy, some information might be incomplete or outdated.
Reference the Code: For the most up-to-date and complete understanding of the API's functionality, please refer to the latest source code.
Community Support: If you have any questions or need assistance, don't hesitate to reach out to our community forums.
On This Page
- 1 Cavrnus Types
- 2 Functions
- 2.1 Authentication
- 2.2 Space Functions
- 2.3 Property Functions
- 2.4 Permissions
- 2.5 Spawned Objects
- 2.6 Remote Content
- 2.7 Space Users
- 2.8 Voice and Video
- 3 Public Headers
- 3.1 Core Headers
- 3.2 LivePropertyUpdates
- 3.3 ValueSyncs
- 3.4 Types
- 3.5 FlagComponents
- 3.6 UI
Cavrnus Types
FCavrnusSpaceConnection | This is the most important object in Cavrnus. It represents a user’s connection to a Space. As such it is used to access Properties, hook Users, etc. |
FCavrnusAuthentication | This contains the Token received from the server upon a successful login. You can only ever have one active login at a time. At the moment, outside of just existing, this class doesn’t really “do” anything. |
FCavrnusSpaceInfo | This is the live info about a given Space. It can be used to create a Spaces List, like the one provided in Cavrnus by default. |
FCavrnusUser | This represents an individual user, and can be used to fetch their properties at runtime. |
FCavrnusLiveXPropertyUpdate | This is used to post Transient Updates. |
FCavrnusSpawnedObject | This represents an object that was spawned in a synchronized way at runtime using Cavrnus. It is used to manage that objects properties and, if desired, to delete it. |
FCavrnusRemoteContent | Represents a file that has been uploaded to the Cavrnus Servers. |
FCavrnusInputDevice | This represents a microphone, and can be used to create a Audio/Video selector, like the one provided in Cavrnus by default. |
FCavrnusOutputDevice | This represents the speakers the app’s voice and video play out of. NOTE: This only affects the Cavrnus voice chat, not your application’s other sounds. |
FCavrnusVideoInputDevice | This represents a Video Source (both Cameras and Desktop Streams), and can be used to create a Audio/Video selector, like the one provided in Cavrnus by default. |
Functions
Authentication
Gets user credentials, allowing you to join valid spaces and make other requests | |
Creates a guest user account with a given name and joins as that user | |
Checks if you are logged in | |
Throws an even when user authentication is complete |
Space Functions
Gets a list of all current spaces which can be joined | |
Triggers when spaces become available to you that you can join, or when their metadata changes | |
Checks if there is any active connection to a space | |
Connects to a Space; joining voice & video and recieving/processing the journal | |
Triggers when you begin attempting to join a space, returning the ID of the space being joined | |
Triggers immediately if you are already in a space, otherwise triggers as soon as you connect | |
Disconnects you from a given space. You will stop recieving property updates, and lose user & voice connections |
Property Functions
Booleans
Defines what the application will show if a new prop value has not been assigned | |
Gets the current property value, whether the default or the one currently set | |
Triggers an Event when the property changes, plus an inital event when first bound | |
Begins a temporary property update. This can be updated with UpdateWithNewData() This will show for everyone in the space, but will not be saved unless you call Finish(). | |
Updates the property value at the given path and synchronizes the data to the server |
Floats
Defines what the application will show if a new prop value has not been assigned | |
Gets the current property value, whether the default or the one currently set | |
Triggers an Event when the property changes, plus an inital event when first bound | |
Begins a temporary property update. This can be updated with UpdateWithNewData() This will show for everyone in the space, but will not be saved unless you call Finish(). | |
Updates the property value at the given path and synchronizes the data to the server |
Strings
Defines what the application will show if a new prop value has not been assigned | |
Gets the current property value, whether the default or the one currently set | |
Triggers an Event when the property changes, plus an inital event when first bound | |
Begins a temporary property update. This can be updated with UpdateWithNewData() This will show for everyone in the space, but will not be saved unless you call Finish(). | |
Updates the property value at the given path and synchronizes the data to the server |
Vectors
Defines what the application will show if a new prop value has not been assigned | |
Gets the current property value, whether the default or the one currently set | |
Triggers an Event when the property changes, plus an inital event when first bound | |
Begins a temporary property update. This can be updated with UpdateWithNewData() This will show for everyone in the space, but will not be saved unless you call Finish(). | |
Updates the property value at the given path and synchronizes the data to the server |
Transforms
Defines what the application will show if a new prop value has not been assigned | |
Gets the current property value, whether the default or the one currently set | |
Triggers an Event when the property changes, plus an inital event when first bound | |
Begins a temporary property update. This can be updated with UpdateWithNewData() This will show for everyone in the space, but will not be saved unless you call Finish(). | |
Updates the property value at the given path and synchronizes the data to the server |
Color
Defines what the application will show if a new prop value has not been assigned | |
Gets the current property value, whether the default or the one currently set | |
Triggers an Event when the property changes, plus an inital event when first bound | |
Begins a temporary property update. This can be updated with UpdateWithNewData() This will show for everyone in the space, but will not be saved unless you call Finish(). | |
Updates the property value at the given path and synchronizes the data to the server |
Permissions
Binds an event to throw when a policy is/isn't allowed for the user (returns false until policies are fetched & resolved) | |
Binds an event to throw when a policy is/isn't allowed for the user in a given space (returns false until policies are fetched & resolved) |
Spawned Objects
Instantiates the given object with no set properties (note you will need to pull the Container ID out of the Spawned Object and assign property values to it). | |
Destroys the given object. |
Remote Content
Uploads a file from your disk to the Cavrnus Server | |
Uploads a file from your disk to the Cavrnus Server with additional metadata | |
Fetches a list of available files on your Domain that you can download. | |
Fetches a file from the Cavrnus Server and gives you a list of bytes | |
Fetches a file from the Cavrnus Server and saves it as a file on disk |
Space Users
Throws an event when the local CavrnusUser arrives in the space | |
Gives the list of current users in a space | |
Triggers whenever users join or leave a given space | |
Throws an event with the user's current stream image |
Voice and Video
Set my muted state | |
Set my streaming state | |
Gets available microphones | |
Sets which microphone to use | |
Gets available speakers | |
Sets which speaker to use | |
Gets available camera/stream sources | |
Sets which camera/stream source to use |
Public Headers
The header files & folders in the Source/Public folder define the structure and functionality of the Cavrnus Spatial Connector plugin for Unreal Engine
Core Headers | The core functionality of the Cavrnus Spatial Connector, including the definition of the CavrnusSpatialConnector actor that can be placed in a level to immediately connect your Unreal project to the metaverse. |
LivePropertyUpdates | The header files in the |
ValueSyncs | The header files within the |
Types | The header files in the "Types" folder define essential data structures used throughout the Cavrnus Spatial Connector plugin. |
FlagComponents | The header files in the FlagComponents folder relate to flagging or marking entities within the Cavrnus system (users, avatars, spawned objects). These components play a role in identifying and tracking these entities for collaboration. |
UI | The header files in the "UI" folder define the core structure and functionality of the user interface (UI) elements for the Cavrnus Spatial Connector plugin. They enable users to log in, select spaces, view other users, and potentially perform other essential actions within the collaborative environment. |
Pagination | The header files in the "Pagination" folder define the UI structure and interface for handling pagination of list elements within the Cavrnus Spatial Connector plugin. |
SpaceList | The header files in the "UI/SpaceList" folder define the UI elements and logic for displaying and interacting with a list of Cavrnus spaces. |