When i add virtual buttons to my project I write a script for it, assign the script to the ImageTarget, Test it and nothing happens when i hover my finger over the Virtual Button it does nothing at all.
Heres my script:
using UnityEngine;
using System.Collections;
public class VirtualButtonEventHandler : MonoBehaviour, IVirtualButtonEventHandler {
char x;
char a = 'a';
public GameObject Keyboard;
public GameObject Text;
// Use this for initialization
void Start () {
Keyboard = transform.FindChild("Text").gameObject;
}
public void OnButtonPressed(VirtualButtonBehaviour vb){
Debug.Log ("Pressed");
GetComponent<TextMesh>().text = "test";
}
public void OnButtonReleased(VirtualButtonBehaviour vb){
Debug.Log("Released");
}
void Update () {
}
}
Please tell me the problem or give me a tutorial because there are no tutorials on the Qualcomm website that tell you how to do it.