Skip to content

Instantly share code, notes, and snippets.

@icywind
Last active August 24, 2020 23:17
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 icywind/d1ce6618507ce82fbb4a2423da2ec6c8 to your computer and use it in GitHub Desktop.
Save icywind/d1ce6618507ce82fbb4a2423da2ec6c8 to your computer and use it in GitHub Desktop.
void SetupUI()
{
GameObject go = GameObject.Find("MyView");
myView = go.AddComponent<VideoSurface>();
go = GameObject.Find("LeaveButton");
go?.GetComponent<Button>()?.onClick.AddListener(Leave);
go = GameObject.Find("JoinButton");
go?.GetComponent<Button>()?.onClick.AddListener(Join);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment