(Sorry for my bad england)Hi, im trying to make a multiplayer game. I’m currently trying to make a button which will send a request to selected player. For selected player to be able to accept or reject the requset i made a ui for it and disabled it as default. However, whenever im trying to acsess the ui and enable it, unity gives me an error. Error was object instantiate could not be found or something like that. Im trying to solve the issue for the last 4 hours but i couldn’t do anything. Can anyone help me what to do in this situation.
` [PunRPC]
public void GetReq(string sender)
{
request_page = GameObject.FindGameObjectWithTag("reqpage");
Debug.Log("Mine");
request_page.SetActive(true);
request_page.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = sender;
}
public void SendReq()
{
if (!PhotonView.Get(choosenone).IsMine)
{
choosenone.GetComponent<PhotonView>().RPC("GetReq", RpcTarget.AllBuffered, this.gameObject.GetComponent<ServerSide>().username);
}
}