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 3 Current »

- Declaration

static TArray<FCavrnusUser> GetCurrentSpaceUsers(FCavrnusSpaceConnection SpaceConnection);

- Description

This gives a list of all FCavrnusUsers (TODO:LINK) currently in the space. Note that this list may be empty if called too soon after JoinSpace.

This list will only provide a snapshot of the user states, and will not be updated as users join/leave.

For a more robust/maintained list of users consider calling BindSpaceUsers.

- Blueprint Sample

GetCurrentSpaceUsers.png

- Code Sample

#include "CavrnusFunctionLibrary.h"
#include "Types/CavrnusSpaceConnection.h"
#include "Types/CavrnusUser.h"

void UClassName::LogAllUsers()
{
  // Member is FCavrnusSpaceConnection SpaceConnection
  TArray<FCavrnusUser> UserList = UCavrnusFunctionLibrary::GetCurrentSpaceUsers(SpaceConnection);
  
  for (auto User : UserList)
  {
    UE_LOG(LogTemp, Log, TEXT("User %s is in the space."), *User.UserConnetionId);
  }
}

  • No labels