Skip to content

Instantly share code, notes, and snippets.

@AndrewWeston9
Last active October 6, 2017 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewWeston9/f1db51132d3df072ec7b3324504b217d to your computer and use it in GitHub Desktop.
Save AndrewWeston9/f1db51132d3df072ec7b3324504b217d to your computer and use it in GitHub Desktop.
EmoteWheel.cs Snippet: Camera pause function when GUI is in use. Created by myself and another team member.
if(menuon == true)
{
setUIToFalse = false;
PCamera = this.transform.parent.gameObject;
netIDC = PCamera.GetComponent<NetworkIdentity>().netId;
PCamera = ClientScene.FindLocalObject(netIDC);
pmove = PCamera.GetComponent<PlayerMove>();
pmove.SetUIOpenTrue();
}
else if (setUIToFalse == false)
{
setUIToFalse = true;
PCamera = this.transform.parent.gameObject;
netIDC = PCamera.GetComponent<NetworkIdentity>().netId;
PCamera = ClientScene.FindLocalObject(netIDC);
pmove = PCamera.GetComponent<PlayerMove>();
pmove.SetUIOpenFalse();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment