Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
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!");
        }
    }
}