Last active
July 22, 2017 16:04
-
-
Save nipundavid/abe83bfaeed383a0de861e76548b8034 to your computer and use it in GitHub Desktop.
This file contains 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
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