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 12 Next »

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 adding the Cavrnus Plugin to their Package Manager via the git link: https://github.com/Cavrnus-Inc/cavrnus-sdk.git

There are multiple layers of convenience tools to make it easier for you to set up and get going with Cavrnus with little-to-no coding required. However, all of those tools are built using the functions and types below. For improved control and performance, any advanced user of Cavrnus can call them.

CAVRNUS FUNCTIONS

Core

InitializeCavrnus

Sets up all static helpers and systems required for Cavrnus to run

void

Authentication

IsLoggedIn

Checks if you are logged in

N/A

bool

AuthenticateWithPassword

Gets guest user credentials, allowing you to join valid spaces and make other requests

FString server,
FString email,
FString password,
FCavrnusAuthRecv onSuccess,
FCavrnusError onFailure

void

AuthenticateAsGuest

Gets guest user credentials via a link, and informs you of the spaceId you should then join

FString server,
FString userName,
FCavrnusAuthRecv onSuccess,
FCavrnusError onFailure

void

AwaitAuthentication

Throws an even when user authentication is complete

Space Functions

FetchJoinableSpaces

Gets a list of all current spaces which can be joined

BindJoinableSpaces

Triggers when spaces become available to you that you can join, or when their metadata changes

FCavrnusSpaceInfoEvent spaceAdded, FCavrnusSpaceInfoEvent spaceUpdated, FCavrnusSpaceInfoEvent spaceRemoved

FCavrnusBinding

IsConnectedToAnySpace

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,
FCavrnusSpaceConnected onConnected, FCavrnusError onFailure

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,
FString containerName,
FString propertyName,
FColor propertyValue

void

GetColorPropertyValue

Gets the current property value, whether the default or the one currently set

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName

Fcolor

BindColorPropertyValue

Triggers an Event when the property changes, plus an inital event when first bound

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName, FColorPropertyUpdated onPropertyUpdated

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 containerName,
FString propertyName,
FColor propertyValue,
FString transientToContinue = ""

Fstring

PostColorPropertyUpdate

Updates the property value at the given path and synchronizes the data to the server

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FColor propertyValue,
FString transientToFinish = ""

void

Bool Property Functions

DefineBoolPropertyDefaultValue

Defines what the application will show if a new prop value has not been assigned

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
bool propertyValue

void

GetBoolPropertyValue

Gets the current property value, whether the default or the one currently set

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName

bool

BindBooleanPropertyValue

Triggers an Event when the property changes, plus an inital event when first bound

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FBoolPropertyUpdated onPropertyUpdated

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 containerName,
FString propertyName,
bool propertyValue,
FString transientToContinue = ""

Fstring

PostBoolPropertyUpdate

Updates the property value at the given path and synchronizes the data to the server

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
bool propertyValue,
FString transientToFinish = ""

void

Float Property Functions

DefineFloatPropertyDefaultValue

Defines what the application will show if a new prop value has not been assigned

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
float propertyValue

void

GetFloatPropertyValue

Gets the current property value, whether the default or the one currently set

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName

float

BindFloatPropertyValue

Triggers an Event when the property changes, plus an inital event when first bound

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FFloatPropertyUpdated onPropertyUpdated

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 containerName,
FString propertyName,
float propertyValue,
FString transientToContinue = ""

Fstring

PostFloatPropertyUpdate

Updates the property value at the given path and synchronizes the data to the server

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
float propertyValue,
FString transientToFinish = ""

void

String Property Functions

DefineStringPropertyDefaultValue

Defines what the application will show if a new prop value has not been assigned

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FString propertyValue

void

GetStringPropertyValue

Gets the current property value, whether the default or the one currently set

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName

Fstring

BindStringPropertyValue

Triggers an Event when the property changes, plus an inital event when first bound

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FStringPropertyUpdated onPropertyUpdated

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 containerName,
FString propertyName,
FString propertyValue,
FString transientToContinue = ""

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,
FString containerName,
FString propertyName,
FVector4 propertyValue

void

GetVectorPropertyValue

Gets the current property value, whether the default or the one currently set

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName

FVector4

BindVectorPropertyValue

Triggers an Event when the property changes, plus an inital event when first bound

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FVectorPropertyUpdated onPropertyUpdated

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 containerName,
FString propertyName,
FVector4 propertyValue,
FString transientToContinue = ""

Fstring

PostVectorPropertyUpdate

Updates the property value at the given path and synchronizes the data to the server

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FVector4 propertyValue,
FString transientToFinish = ""

void

Transform Property Functions

DefineTransformPropertyDefaultValue

Defines what the application will show if a new prop value has not been assigned

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FTransform propertyValue

void

GetTransformPropertyValue

Gets the current property value, whether the default or the one currently set

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName

Ftransform

BindTransformPropertyValue

Triggers an Event when the property changes, plus an inital event when first bound

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FTransformPropertyUpdated onPropertyUpdated

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 containerName,
FString propertyName,
FTransform propertyValue,
FString transientToContinue = ""

Fstring

PostTransformPropertyUpdate

Updates the property value at the given path and synchronizes the data to the server

FCavrnusSpaceConnection spaceConn,
FString containerName,
FString propertyName,
FTransform propertyValue,
FString transientToFinish = ""

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

SpawnObject

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 uniqueIdentifier

Fstring

DestroyObject

Destroys the given object.

FCavrnusSpaceConnection spaceConn,
FCavrnusSpawnedObject spawnedObject

void

Space Users

AwaitLocalUser

Throws an event when the local CavrnusUser arrives in the space

GetCurrentSpaceUsers

Gives the list of current users in a space

BindSpaceUsers

Triggers whenever users join or leave a given space

FCavrnusSpaceConnection spaceConn,
FCavrnusSpaceUserEvent userAdded,
FCavrnusSpaceUserEvent userRemoved

BindUserVideoFrames

Throws an event with the user's current stream image

FCavrnusSpaceConnection spaceConn,
FCavrnusUser& User,
FCavrnusUserVideoFrameEvent OnVideoFrameUpdate

Voice and Video

SetLocalUserMutedState

Set my muted state

SetLocalUserStreamingState

Set my streaming state

GetCurrentAudioInputDevice

Gets the current microphone

FetchAudioInputs

Gets available microphones

UpdateAudioInput

Sets which microphone to use

FetchVideoInputs

Gets available camera/stream sources

UpdateVideoInput

Sets which camera/stream source to use

  • No labels