-
-
Save digitallysavvy/5258d9c643dfe9de3862382e546569ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void OnButtonClick() | |
{ | |
Debug.Log("Button Clicked: " + name); | |
// determin which button | |
if (name.CompareTo("JoinButton") == 0) | |
{ | |
// join chat | |
OnJoinButtonClicked(); | |
} | |
else if (name.CompareTo("LeaveButton") == 0) | |
{ | |
// leave chat | |
OnLeaveButtonClicked(); | |
} | |
} | |
private void OnJoinButtonClicked() | |
{ | |
Debug.Log("Join button clicked"); | |
// get channel name from text input | |
GameObject go = GameObject.Find("ChannelName"); | |
InputField input = go.GetComponent<InputField>(); | |
} | |
private void OnLeaveButtonClicked() | |
{ | |
Debug.Log("Leave button clicked"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment