public void Connect()
        {
            if (!PhotonNetwork.connected)
            {
                OnConnectedToMasterSignal.Dispatch();

                PhotonNetwork.playerName = PlayerName;
                PhotonNetwork.ConnectUsingSettings("v1.0");
            }
            else
            {
                OnConnectedToMaster();
            }
        }
 private void OnConnectedToMaster()
 {
     OnConnectedToMasterSignal.Dispatch();
 }