Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

How to Impliment a Virtual Button with Vuforia 8

Discussion in 'Vuforia' started by unity_JH8dHOdsOyUAlQ, Jan 12, 2019.

  1. unity_JH8dHOdsOyUAlQ

    unity_JH8dHOdsOyUAlQ

    Joined:
    Jan 12, 2019
    Posts:
    1
    I have updated the vuforia and now I have the 8 Version but at the prefabs I cant find any VirtualButton. Can anybody help me how to implement it?
     
  2. Martinsuarezgross

    Martinsuarezgross

    Joined:
    Feb 7, 2019
    Posts:
    2
    Assets/Qualcomm Augmented Reality/Prefabs-folder. Here you’ll find the VirtualButton.
    the code you should use is:
    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) { }
    }
     
  3. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    263
  4. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    873
    seems out of date since the prefabs for virtual buttons aren't included with Vuforia anymore
     
  5. Sika_MC

    Sika_MC

    Vuforia

    Joined:
    Jul 17, 2019
    Posts:
    96
    Hi @ina In our core sample app, we demo how to use virtual buttons. Thank you. Vuforia Engine Support
     
  6. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    873
    Seem to recall the old Vuforia unitypackages, the virtual buttons were included as prefabs in the main package.
     
  7. Sika_MC

    Sika_MC

    Vuforia

    Joined:
    Jul 17, 2019
    Posts:
    96
    Hi @ina Could be, don't remember, in the current core sample apps we have the scene: 3-Virtual Buttons in which demo the use of Virtual Buttons. Thank you. Vuforia Engine Support
     
  8. babashyamhcl

    babashyamhcl

    Joined:
    May 11, 2020
    Posts:
    1
    When you select the image target, then in the inspector tab, you will see image target behavior (script) section. There is one advanced arrow button, click that and you will see Add Virtual Button option.
     
unityunity