Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    266
  4. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,080
    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:
    1,080
    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.
     
    Noor23 likes this.
  9. lavidtce

    lavidtce

    Joined:
    Feb 2, 2020
    Posts:
    1
    It does not happen at new Interface (Unity 2019 + Vuforia 9).
     
    Omkarrr likes this.