public class StreamingMenuSpaceStateUtility : MonoBehaviour
{
private CavrnusSpaceConnection spaceConn;
public void Start()
{
CavrnusFunctionLibrary.AwaitAnySpaceConnection(spaceConn => this.spaceConn = spaceConn);
}
privatepublic void OnEnablePrintCurrentUsersToConsole()
{
var users = spaceConn.GetCurrentSpaceUsers();
var usersStreaming = users.Where(user => user.GetUserStreaming());
foreach (var user in usersStreamingusers) {
Debug.Log($"{user.ContainerId} is {user.GetUserName()} is streaming!");
}
}
} |