GetCurrentSpaceUsers (Unreal Engine)

- 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
Get Current Space Users

- 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); } }

 

Related pages