public override void OnConnectedSocialServer()
 {
     MalinLog.Get().ShowLog("Success to connect to the social server.");
     XRSocialSDK.JoinLobby();
     demoRoom = XRSocialSDK.GetRoomInfoFromLobby(Constants.DemoRoomName);
     EnterRoom();
 }
 public void StartInterview()
 {
     if (roomPlayersState.isIntervieweeWait && roomPlayersState.isInterviewerReady && roomPlayersState.isInterviewerWait)
     {
         XRSocialSDK.SendBroadcastMessage(new RoomStartInterviewMessage());
     }
     else
     {
         MalinLog.Get().ShowLog("Cannot start the interview: Interviewee is not ready or one of both is not connected in the room.");
     }
 }
 public override void OnAccountError(ErrorCode errorCode)
 {
     if (errorCode == ErrorCode.ExistAccount || ((int)errorCode) == 6003)
     {
         MalinLog.Get().ShowLog($"Already signed up, log in...");
         LogIn(currentId);
     }
     else
     {
         MalinLog.Get().ShowLog($"Fail to sign up or log in... code : {errorCode}");
     }
 }
 // Start is called before the first frame update
 void Start()
 {
     if (!ChatManager.IsConnect())
     {
         MalinLog.Get().ShowLog("Chat server is not connected. Try to connect..");
         ChatManager.Connect(Constants.DemoChatChannel, XRSocialSDK.myPlayer.userNickname);
     }
     else
     {
         MalinLog.Get().ShowLog("Chat server is already connected.");
     }
 }
    public override void OnConnectedMainServer(string appToken)
    {
        MalinLog.Get().ShowLog("Success to connect to the main server.");

        if (appToken.Length == 0)
        {
            MalinLog.Get().ShowLog("AppToken is Empty! XR social SDK will not work... Please check the Api key and user name.");
        }

        SalinTokens.AppToken = appToken;
        //SceneManager.LoadScene("LoginScene", LoadSceneMode.Single);
        SceneManager.LoadScene("DemoLoginScene", LoadSceneMode.Single);
    }
 public override void OnConnectedSocialServerFail(DisconnectCause disconnectCause)
 {
     MalinLog.Get().ShowLog($"Fail to connect to the social server... code : {disconnectCause}");
 }
 public override void OnLogIn(UserInfo info)
 {
     MalinLog.Get().ShowLog($"Log in Success! Id:{info.userAccount}, name:{info.userNickname}");
     XRSocialSDK.ConnectToSocialServer(true);
 }
 public override void OnSignUp()
 {
     MalinLog.Get().ShowLog($"Sign up Success! Id:{currentId}");
     LogIn(currentId);
 }
 public override void OnLeftLobby()
 {
     MalinLog.Get().ShowLog("Left lobby.");
 }
 public override void OnJoinedLobby()
 {
     MalinLog.Get().ShowLog("Success to Join lobby.");
 }
 public override void OnConnectedMainServerFail(ErrorCode errorCode)
 {
     MalinLog.Get().ShowLog($"Fail to connect to the main server... code : {errorCode}");
 }
 public override void OnChatError(ErrorCode errorCode)
 {
     MalinLog.Get().ShowLog($"Chat error occured : {errorCode}");
 }
 public override void OnChatUserDisconnect(string channel, string username)
 {
     MalinLog.Get().ShowLog($"Chat user leave : {username}");
     AppendChatMessage($"{username} Disconnected.");
 }
 public override void OnChatSendMessageSuccess()
 {
     MalinLog.Get().ShowLog("Success to send chat message.");
 }
 public override void OnChatDisconnect()
 {
     MalinLog.Get().ShowLog("Chat server is now disconnected.");
 }