Search Unity

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:
    253
  4. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    826
    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:
    34
    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:
    826
    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:
    34
    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