Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Virtual Button on vuforia to increment percentage

Discussion in 'AR/VR (XR) Discussion' started by Martinsuarezgross, Feb 7, 2019.

  1. Martinsuarezgross

    Martinsuarezgross

    Joined:
    Feb 7, 2019
    Posts:
    2
    Hi, I am trying to make two virtualbuttons on an image target, this two button are minus (-) and plus (+) and y want that these two buttons could increment a number in 3dtext but i do not know how. Any ideas? I have this code:

    using UnityEngine;

    public class increment : MonoBehaviour, IVirtualButtonEventHandler
    {
    /// <summary>
    /// Called when the scene is loaded
    /// </summary>
    void Start() { }

    /// <summary>
    /// Called when the virtual button has just been pressed:
    /// </summary>
    public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { }

    /// <summary>
    /// Called when the virtual button has just been released:
    /// </summary>
    public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { }
    }