Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using UnityEngine;
public class AndroidCallBacks : MonoBehaviour {
private string yes = "0";
private string no = "1";
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void HandleCallBacks(string buttonIndex)
{
Debug.Log(buttonIndex);
if (buttonIndex == yes)
{
GameObject.FindGameObjectWithTag("controller").GetComponent<Controller>().reply.text = "Yes Pressed";
}else if(buttonIndex == no)
{
GameObject.FindGameObjectWithTag("controller").GetComponent<Controller>().reply.text = "No Pressed";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.