Help With Error Detecting in script

Hello i need help with detecting problem in my script…
The problem is when it goes to PlayGamesPlatform.Instance.RealTime.ShowWaitingRoomUI();
Then only flash WaitRoomUI and after one sec automatically exit can someone help me?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using GooglePlayGames.BasicApi.Multiplayer;




public class ControlScript : MonoBehaviour, RealTimeMultiplayerListener{

    public float Speed;
    public GameObject PlayerOne;
    public Text PlayerOneText;
    public GameObject PlayerTwo;
    public Text PlayerTwoText;
    public GameObject player;


    // Use this for initialization

    void Start() {
        Authenticate();

    }

    // Update is called once per frame
    void Update () {
        if (player=PlayerOne)
        {
            //AccelerometerMoveOne();
            string PlayerOneData = "PlayerOne" + ":" + PlayerOne.transform.position.x + ":" + PlayerOne.transform.position.y;
            byte[] PlayerOneDataArr = System.Text.ASCIIEncoding.Default.GetBytes(PlayerOneData);
            PlayGamesPlatform.Instance.RealTime.SendMessageToAll(false,PlayerOneDataArr);

        } else if (player = PlayerTwo)
        {
            //AccelerometerMoveTwo();
            string PlayerTwoData = "PlayerTwo" + ":" + PlayerTwo.transform.position.x + ":" + PlayerTwo.transform.position.y;
            byte[] PlayerTwoDataArr = System.Text.ASCIIEncoding.Default.GetBytes(PlayerTwoData);
            PlayGamesPlatform.Instance.RealTime.SendMessageToAll(false, PlayerTwoDataArr);
        }

    }

    void Authenticate() {
       
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
       .Build();

        PlayGamesPlatform.InitializeInstance(config);
        // recommended for debugging:
        PlayGamesPlatform.DebugLogEnabled = true;
        // Activate the Google Play Games platform
        PlayGamesPlatform.Activate();
        PlayGamesPlatform.Instance.Authenticate((bool success) => {
            if (success)
            {
                CreateQuickGame();
            }
            else {
              
            }
        });
    }

    void CreateQuickGame() {
        const int MinOpponents = 1, MaxOpponents = 2;
        const int GameVariant = 0;
        PlayGamesPlatform.Instance.RealTime.CreateQuickGame(MinOpponents, MaxOpponents,
                    GameVariant, this);
    }

    private bool IsRoomSetupped = false;
    public void OnRoomSetupProgress(float progress)
    {
        if (progress>=20f)
        {
            IsRoomSetupped = true;
            PlayGamesPlatform.Instance.RealTime.ShowWaitingRoomUI();
        }
      
    }

    private bool connected = false;
    public void OnRoomConnected(bool success)
    {
        if (success)
        {
            Participant myself = PlayGamesPlatform.Instance.RealTime.GetSelf();
            List<Participant> participants = PlayGamesPlatform.Instance.RealTime.GetConnectedParticipants();
            PlayerOneText.text = participants[0].DisplayName;
            PlayerTwoText.text = participants[1].DisplayName;
            if (myself.ParticipantId == participants[0].ParticipantId)
            {
                player = PlayerOne;
               // Camera.main.GetComponent<CameraFollow>().setTarget(PlayerOne.transform);


            }
            else if (myself.ParticipantId == participants[1].ParticipantId)
            {
                player = PlayerTwo;
                //Camera.main.GetComponent<CameraFollow>().setTarget(PlayerTwo.transform);

              
            }
            connected = true;
          
        }
        else
        {
            connected = false;
            // ...show error message to user...
        }
    }

    public void OnLeftRoom() {
        connected = false;
    }

    public void OnParticipantLeft(Participant participant) {
      
    }

    public void OnPeersConnected(string[] participentIds)
    {
      
    }

 
    public void OnPeersDisconnected(string[] participentIds)
    {

        Debug.Log("Dissconnected");
    }




    public void OnRealTimeMessageReceived(bool IsReliable,string SenderId,byte[] data)
    {

        string position = System.Text.Encoding.Default.GetString(data);
        string[] raw = position.Split(new string[] { ":" }, System.StringSplitOptions.RemoveEmptyEntries);
        if (!IsReliable)
        {
            //if (raw[0] == "ball")
           // {
                //ball.transform.position = new Vector2(System.Convert.ToSingle(raw[1]), System.Convert.ToSingle(raw[2]));
          //      Debug.Log("WHAT");
          //  }
            if (raw[0] == "PlayerOne")
            {
                PlayerOne.transform.position = new Vector2(System.Convert.ToSingle(raw[1]), System.Convert.ToSingle(raw[2]));
            }
            if (raw[0] == "PlayerTwo")
            {
                PlayerTwo.transform.position = new Vector2(System.Convert.ToSingle(raw[1]), System.Convert.ToSingle(raw[2]));
            }
        }

      
    }


}

Well firstly you have a critical error in your Update function. I’ve reformatted it to make the bugs stand out:

    void Update () {
        if (player=PlayerOne)
        {
        } else if (player = PlayerTwo)
        {
        }
    }

Because you used = instead of ==, I’m sure you’re getting all kinds of unexpected results because of this. Fix that first, then see if you still have more errors.

Thx you it is fixed with == and now i have problems with player movements :
I trying Accelerometer but when i call AccelerometerMoveOne() under update class then it dont work
any Ideas? Player is GameObject

void AccelerometerMoveOne()
    {
        float x = Input.acceleration.x;
        float y = Input.acceleration.y;


        if (x < -0.1f)
        {
            if (y > 0.1f)
            {
                MoveUp(y);
            }
            else if (y < -0.1f)
            {
                MoveDown(y);
            }
            MoveLeft(x);
        }
        else if (x > 0.1f)
        {
            if (y > 0.1f)
            {
                MoveUp(y);
            }
            else if (y < -0.1f)
            {
                MoveDown(y);
            }
            MoveRight(x);
        }
        else if (y > 0.1f)
        {
            MoveUp(y);
        }
        else if (y < -0.1f)
        {
            MoveDown(y);
        }
        else
        {
            SetVelocityZero();
        }
    }
    public void SetVelocityZero()
    {
        Vector2 temp = Player.transform.position;
        temp.x += 0.0f;
        Player.transform.position = temp;
    }

    public void MoveLeft(float s)
    {
        Vector2 temp = Player.transform.position;
        temp.x += s * Speed * Time.deltaTime;
        Player.transform.position = temp;
    }

    public void MoveRight(float s)
    {
        Vector2 temp = Player.transform.position;
        temp.x += s * Speed * Time.deltaTime;
        Player.transform.position = temp;
    }

    public void MoveUp(float s)
    {
        Vector2 temp = Player.transform.position;
        temp.y += s * Speed * Time.deltaTime;
        Player.transform.position = temp;
    }

    public void MoveDown(float s)
    {
        Vector2 temp = Player.transform.position;
        temp.y += s * Speed * Time.deltaTime;
        Player.transform.position = temp;
    }