FCavrnusUser (Unreal Engine)

- Fields

bool IsLocalUser;

FString PropertiesContainerName;

FString UserConnectionId;

FCavrnusSpaceConnection SpaceConn;

UTexture2D* VideoFrameTexture;

 

This represents a user present in a given Space. It can used or building out users-list UI, etc.

IsLocalUser says if this is the local user (no, really?).

PropertiesContainerName can be used to Post/Bind/etc to their properties (see their well-known properties below).

UserConnectionId uniquely identifies this user’s connection to the space. Note that if a user rejoins, or joins multiple times at once, each join will have a unique PropertiesContainerName and UserConnectionId.

SpaceConn is simply the space the user is currently in. It should be the same as the FCavrnusSpaceConnection you got from joining the space.

VideoFrameTexture is the pointer to the user’s video texture.

- Well-Known User Properties

Some default properties are provided for a given FCavrnusUser. These are readonly, and posting values to them will have no effect.

Instead, these values originate from the user’s profile, and can be modified in the Admin Portal. They are then given to the properties system under-the-hood.

Any changes to these values will result in normal property update events for Bind calls, etc.

NOTE: These are case-sensitive. Should you wish to Bind to them or use them in no-code components be sure to copy-paste them exactly.

Property Name

Description

name (String Property)

The user’s current Screen Name

userId (String Property)

The user’s overall unique server identifier. This will never change.

Note: If the same user is logged in & in the space multiple times, those instance will share a userId

connectionId (String Property)

The unique ID of a user’s connection to a space. This will never change.

Note: If the same user is logged in & in the space multiple times, those instance will each have a unique connectionId

Note: When a user re-joins a space they will always get a new connectionId. All values posted to a connectionId should therefore be Transient.

profilePicture (String Property)

This gives the URL of the user’s profile picture. To display this you can simply use a Unity WWW call.

muted (Bool Property)

Says if the user is currently muted.. (They can set this value by calling SetLocalUserMutedState)

streaming (Bool Property)

Says if the user is currently streaming. (They can set this value by calling SetLocalUserStreamingState)

volume (Float Property)

Returns a float value representing how loudly the user is speaking

speaking (Bool Property)

Returns true if the user is speaking. This is based on checking if volume < .005