public static void Initialize(SteamListener listener)
    {
        if (Instance == null)
        {
            Instance = new GameObject("Steam Listener").AddComponent <SteamListenerUnity>();
        }

        Instance.Listener = listener;
    }
    public static void Initialize(SteamClientConnection connection)
    {
        if (Instance == null)
        {
            Instance = new GameObject("Steam Listener").AddComponent <SteamListenerUnity>();
        }

        Instance.Connection = connection;
    }
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(this);
     }
 }
 public override void StartListening()
 {
     if (SteamManager.Initialized)
     {
         SteamListenerUnity.Initialize(this);
         WriteEvent($"Starting a {LobbyType} lobby with {MaxUsers} slots and NoDelay: {NoDelay}.", LogType.Info);
         SteamAPICall_t Handle = SteamMatchmaking.CreateLobby((ELobbyType)LobbyType, MaxUsers);
         OnLobbyCreatedCallResult.Set(Handle);
     }
     else
     {
         WriteEvent("Steamworks is not Initialized.", LogType.Info);
     }
 }
    public SteamClientConnection(ulong lobbyID, int dataSize = 1400, bool noDelay = false)
    {
        NoDelay            = noDelay;
        DataSize           = dataSize;
        LobbyID            = lobbyID;
        Connected          = false;
        LobbyID            = lobbyID;
        SendReliableData   = new byte[DataSize];
        SendUnreliableData = new byte[DataSize];
        RecvData           = new byte[DataSize];
        m_LobbyEnter       = Callback <LobbyEnter_t> .Create(OnLobbyEnter);

        m_LobbyChatUpdate = Callback <LobbyChatUpdate_t> .Create(OnLobbyChatUpdate);

        SteamListenerUnity.Initialize(this);
    }