Disclaimer
This API reference is still in early developmental stages. As such, some information may be missing or out of date. Feel free to refer to this documentation as a low level index of Engine classes and functions. However please reference the latest code for a complete understanding of functionality and performance.
Getting Started
Orientation
Real-time applications built in Unity can be connected to the Cavrnus platform by placing the corresponding Cavrnus Metaverse Connector plugin in the project folder. Once enabled, developers have access to the following functions to enhance the functionality and data sharing of the project.
CAVRNUS FUNCTIONS
Core
InitializeCavrnus | Sets up all static helpers and systems requried for Cavrnus to run | void |
Authentication
Checks if you are logged in | N/A | bool | |
Gets guest user credentials, allowing you to join valid spaces and make other requests | FString server, | void | |
Gets guest user credentials via a link, and informs you of the spaceId you should then join | FString server, | void | |
AwaitAuthentication | Throws an even when user authentication is complete |
Space Functions
FetchJoinableSpaces | 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 | FCavrnusSpaceInfoEvent spaceAdded, FCavrnusSpaceInfoEvent spaceUpdated, FCavrnusSpaceInfoEvent spaceRemoved | FCavrnusBinding | |
Checks if there is any active connection to a space | bool | ||
JoinSpace | Connects to a Space; joining voice & video and recieving/processing the journal | FString spaceId, | void |
AwaitAnySpaceConnection | Triggers immediately if you are already in a space, otherwise triggers as soon as you connect | FCavrnusSpaceConnected onConnected | void |
AwaitAnySpaceBeginLoading | Triggers when you begin attempting to join a space, returning the ID of the space being joined | ||
ExitSpace | Disconnects you from a given space. You will stop recieving property updates, and lose user & voice connections | FCavrnusSpaceConnection spaceConn | void |
Color Property Functions
DefineColorPropertyDefaultValue | Defines what the application will show if a new prop value has not been assigned | FCavrnusSpaceConnection spaceConn, | void |
GetColorPropertyValue | Gets the current property value, whether the default or the one currently set | FCavrnusSpaceConnection spaceConn, | Fcolor |
BindColorPropertyValue | Triggers an Event when the property changes, plus an inital event when first bound | FCavrnusSpaceConnection spaceConn, | FCavrnusBinding |
BeginTransientColorPropertyUpdate | 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(). | FCavrnusSpaceConnection spaceConn, | Fstring |
PostColorPropertyUpdate | Updates the property value at the given path and synchronizes the data to the server | FCavrnusSpaceConnection spaceConn, | void |
Boolean Property Functions
DefineBoolPropertyDefaultValue | Defines what the application will show if a new prop value has not been assigned | FCavrnusSpaceConnection spaceConn, | void |
GetBoolPropertyValue | Gets the current property value, whether the default or the one currently set | FCavrnusSpaceConnection spaceConn, | bool |
BindBooleanPropertyValue | Triggers an Event when the property changes, plus an inital event when first bound | FCavrnusSpaceConnection spaceConn, | FCavrnusBinding |
BeginTransientBoolPropertyUpdate | 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(). | FCavrnusSpaceConnection spaceConn, | Fstring |
PostBoolPropertyUpdate | Updates the property value at the given path and synchronizes the data to the server | FCavrnusSpaceConnection spaceConn, | void |
Float Property Functions
DefineFloatPropertyDefaultValue | Defines what the application will show if a new prop value has not been assigned | FCavrnusSpaceConnection spaceConn, | void |
GetFloatPropertyValue | Gets the current property value, whether the default or the one currently set | FCavrnusSpaceConnection spaceConn, | float |
BindFloatPropertyValue | Triggers an Event when the property changes, plus an inital event when first bound | FCavrnusSpaceConnection spaceConn, | FCavrnusBinding |
BeginTransientFloatPropertyUpdate | 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(). | FCavrnusSpaceConnection spaceConn, | Fstring |
PostFloatPropertyUpdate | Updates the property value at the given path and synchronizes the data to the server | FCavrnusSpaceConnection spaceConn, | void |
String Property Functions
DefineStringPropertyDefaultValue | Defines what the application will show if a new prop value has not been assigned | FCavrnusSpaceConnection spaceConn, | void |
GetStringPropertyValue | Gets the current property value, whether the default or the one currently set | FCavrnusSpaceConnection spaceConn, | Fstring |
BindStringPropertyValue | Triggers an Event when the property changes, plus an inital event when first bound | FCavrnusSpaceConnection spaceConn, | FCavrnusBinding |
BeginTransientStringPropertyUpdate | 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(). | FCavrnusSpaceConnection spaceConn, | Fstring |
PostStringPropertyUpdate | Updates the property value at the given path and synchronizes the data to the server | FCavrnusSpaceConnection spaceConn, FString containerName, FString propertyName, FString propertyValue, FString transientToFinish = "" | void |
Vector Property Functions
DefineVectorPropertyDefaultValue | Defines what the application will show if a new prop value has not been assigned | FCavrnusSpaceConnection spaceConn, | void |
GetVectorPropertyValue | Gets the current property value, whether the default or the one currently set | FCavrnusSpaceConnection spaceConn, | FVector4 |
BindVectorPropertyValue | Triggers an Event when the property changes, plus an inital event when first bound | FCavrnusSpaceConnection spaceConn, | FCavrnusBinding |
BeginTransientVectorPropertyUpdate | 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(). | FCavrnusSpaceConnection spaceConn, | Fstring |
PostVectorPropertyUpdate | Updates the property value at the given path and synchronizes the data to the server | FCavrnusSpaceConnection spaceConn, | void |
Transform Property Functions
DefineTransformPropertyDefaultValue | Defines what the application will show if a new prop value has not been assigned | FCavrnusSpaceConnection spaceConn, | void |
GetTransformPropertyValue | Gets the current property value, whether the default or the one currently set | FCavrnusSpaceConnection spaceConn, | Ftransform |
BindTransformPropertyValue | Triggers an Event when the property changes, plus an inital event when first bound | FCavrnusSpaceConnection spaceConn, | FCavrnusBinding |
BeginTransientTransformPropertyUpdate | 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(). | FCavrnusSpaceConnection spaceConn, | Fstring |
PostTransformPropertyUpdate | Updates the property value at the given path and synchronizes the data to the server | FCavrnusSpaceConnection spaceConn, | void |
CavrnusLivePropertyUpdate | <<Pending>> |
Permissions
BindGlobalPolicy | Binds an event to throw when a policy is/isn't allowed for the user (returns false until policies are fetched & resolved) | ||
BindSpacePolicy | 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). | FCavrnusSpaceConnection spaceConn, | Fstring | |
DestryObject | Destroys the given object. | FCavrnusSpaceConnection spaceConn, | void |
GetIfIsSpawnedObject | Gets the spawned object's data if it was created by Cavrnus | FCavrnusSpaceConnection spaceConn, | FCavrnusSpawnedObject |
FCavrnusSpawnedObject | << Pending >> | ||
UseComponents | << Pending >> |
Space Users
BindSpaceUsers | Triggers whenever users join or leave a given space | FCavrnusSpaceConnection spaceConn, | |
BindUserVideoFrames | Triggers an Event when the property changes | FCavrnusSpaceConnection spaceConn, |
Voice and Video
SetUserMutedState | Set my muted state | Set my muted state | |
SetUserStreamingState | Set my streaming state | Set my streaming state | |
FetchAudioInputs | Gets available microphones | Gets available microphones | |
UpdateAudioInput | Sets which microphone to use | Sets which microphone to use | |
FetchAudioOutputs | Gets available speakers | Gets available speakers | |
UpdateAudioOutput | Sets which speaker to use | Sets which speaker to use | |
FetchVideoInputs | Gets available camera/stream sources | Gets available camera/stream sources | |
UpdateVideoInput | Sets which camera/stream source to use | Sets which camera/stream source to use | |
GetCurrentInput | << Pending >> | ||
GetCurrentOutput | << Pending >> |