/
FCavrnusSpaceInfo (Unreal Engine)

FCavrnusSpaceInfo (Unreal Engine)

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.

Navigation

Cavrnus C++ API Reference > Cavrnus Types

References

Module

CavrnusSpatialConnector

Header

<Project>/Plugins/CavrnusConnector/Source/CavrnusConnector/Public/Types/CavrnusSpaceInfo.h

Include

#include “Types/CavrnusSpaceInfo.h”

Syntax

struct FCavrnusAuthentication(const FString& Token) : Token(Token)

Variables

 

Type

Name

Description

 

Type

Name

Description

 

FString

SpaceName

 

 

FString

SpaceId

 

 

FString

SpaceThumbnail

 

 

FDateTime

LastAccess

 

Constructors

 

Type

Name

Description

 

Type

Name

Description

 

 

FCavrnusAuthentication(const FString& Token)
: Token(Token

  • Constructor to initialize the FCavrnusAuthentication with a given token.

  • @param Token The authentication token

Remarks

  • The FCavrnusSpaceInfo structure contains the current name of the space, its unique ID, and a link to its thumbnail.

  • This information is used for building space selection UIs.

  • This represents the most up-to-date info we have on a current Space. It is mostly used for building space selection UI.

  • To get a list of available CavrnusSpaceInfos, you can call FetchJoinableSpaces or BindJoinableSpaces.

  • SpaceName is the current name of the space.

  • Id is the unique SpaceId. This is the string you will pass into JoinSpace.

  • SpaceThumbnail is the link to the space’s Thumbnail, if one is assigned. Note that in the current SDK most spaces will not have useful thumbnails unless you make them yourself.

  • LastAccess is the last time the current user joined that space. If they have never joined its value will be FDateTime::MinValue().

Sample Code

#include "CavrnusFunctionLibrary.h" #include "Types/CavrnusSpaceInfo.h" // ... (Other includes and class definitions) void AMyActor::DisplaySpaceList(const TArray<FCavrnusSpaceInfo>& Spaces) { for (const FCavrnusSpaceInfo& Space : Spaces) { UE_LOG(LogTemp, Display, TEXT("Space ID: %s, Name: %s"), *Space.Id, *Space.Name); // Optionally, display the thumbnail using Space.ThumbnailUrl // ... (Code to load and display the image) } } void AMyActor::FetchSpaces() { UCavrnusFunctionLibrary::FetchJoinableSpaces(FOnJoinableSpacesDelegate::CreateUObject(this, &AMyActor::DisplaySpaceList)); }

 

 

Related content

FCavrnusUser (Unreal Engine)
FCavrnusUser (Unreal Engine)
Read with this
CavrnusSpaceInfo (Unity)
CavrnusSpaceInfo (Unity)
More like this
AuthenticateWithPassword (Unreal Engine)
AuthenticateWithPassword (Unreal Engine)
Read with this
CavrnusSpaceInfo (.NET)
CavrnusSpaceInfo (.NET)
More like this
API Reference - Unreal
API Reference - Unreal
Read with this
Creating and Managing Spaces
Creating and Managing Spaces
More like this