public void SendInvite() { Debug.Log("SendInvite"); if (!invite) { Debug.Log("SendInvite Initialized (!invite)"); waitingForOtherText.gameObject.SetActive(true); string roomName = PhotonNetwork.CurrentRoom.Name; string type = (string)PhotonNetwork.CurrentRoom.CustomProperties["type"]; messager.SendInvitationForRoom(roomName, type, friendID); invite = true; opponentFound = false; StartCoroutine(WaitForAccept()); } }