so what i am trying to achieve is when i press escape it doesn’t open the other players GUI just mine, but the other players can see my GUI, i am using 4.6 world space gui.
i can open my gui but they dont see it at the moment.
so what i am trying to achieve is when i press escape it doesn’t open the other players GUI just mine, but the other players can see my GUI, i am using 4.6 world space gui.
i can open my gui but they dont see it at the moment.
Hey,
I’ve seen some games with what you want. There is a couple ways to do this that I can think of. I kind of touched on one already which I will explain more on.
Basically it would be easier to make something to appear as the menu then to be a actual GUI. If you want to do a real GUI it would take some work but can be done. In a very similar way that I have made here.
In the screenshot, I have a cube scaled and a texture of a GUI on it. No real GUI.
The way I have made here is pretty straight forward. And you could change it to anything that you would want.
public bool menuTT = false;
public GameObject menuGUI;
void Start () {
menuGUI.SetActive(false);
}
void Update (){
if (networkView.isMine && Input.GetKeyUp (KeyCode.N) && menuTT == true){
menuTT = false;
networkView.RPC("Menufl", RPCMode.OthersBuffered, menuTT);
}
if (networkView.isMine && Input.GetKeyUp (KeyCode.M) && menuTT == false) {
menuTT = true;
networkView.RPC("Menutr", RPCMode.OthersBuffered, menuTT);
}
if (menuTT == true && networkView.isMine){
menuGUI.SetActive(true);
}
if (menuTT == false && networkView.isMine){
menuGUI.SetActive(false);
}
}
[RPC]
void Menutr(bool menuTT)
{
menuGUI.SetActive(true);
}
[RPC]
void Menufl(bool menuTT)
{
menuGUI.SetActive(false);
}
It works 100% tested it. You have to change it over to Photon’s Networking though since its just using Unity’s networking.
thanks, but ive done mine a slightly different way, both work i assume, just on your one, if a player had a gui opened if a player connected they wouldnt see if it was open or not (i think), anywhoo i cant up load the code because its too large, so heres the link on gist: link text