public void AsyncLogin(OnlinePlayerLoggedInDelegate callback)
 {
     if (_localPlayer == null)
     {
         _localPlayer = new OnlineNullLocalPlayer();
         _players.Add(_localPlayer.id.uuid, _localPlayer);
     }
     callback(_localPlayer, null);
 }
        public void AsyncLogin(OnlinePlayerLoggedInDelegate callback)
        {
            if (_hticket == HAuthTicket.Invalid)
            {
                byte[] buff = new byte[1024];
                uint   len;

                _hticket = SteamUser.GetAuthSessionTicket(buff, buff.Length, out len);

                string ticket = System.BitConverter.ToString(buff, 0, (int)len);
                ticket = ticket.Replace("-", string.Empty);

                _localPlayer = new SteamLocalPlayer(this, ticket);

                GetFriends(EFriendFlags.k_EFriendFlagImmediate);

#if !DEDICATED_SERVER && LOGIN_SERVER
                var connectLobby = Utils.GetCommandLineArg("+connect_lobby");

                if (connectLobby != null)
                {
                    uint lobbyID;
                    if (uint.TryParse(connectLobby, out lobbyID))
                    {
                        if (lobbyID != 0)
                        {
                            GameManager.instance.loginServer.pendingLobbyID      = lobbyID;
                            GameManager.instance.loginServer.pendingLobbyConnect = true;
                            GameManager.instance.loginServer.pendingPassword     = string.Empty;                          // password is set in LoginServerNetMsgDispatch
                            Debug.Log("SteamServices: AsyncLogin passed connect_lobby=" + lobbyID);
                        }
                    }
                }
#endif
                HookEvents();
                callback(_localPlayer, null);
            }
        }