Search Unity

How to add custom clickable UI in Unity along with Vuforia augmented avatar?

Discussion in 'Vuforia' started by herosuperman, Nov 12, 2017.

  1. herosuperman

    herosuperman

    Joined:
    Nov 9, 2017
    Posts:
    7
    I would like to add few UI elements like images,text,buttons along with the vuforia augmented 3d model in Unity?
    Also I should be able to interact with the UI.
    Can you help me?
     
  2. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    In the Core Samples, the DefaultTrackableEventHandler.cs script will enable both 3d models and canvases that are children of the Image Target upon detection. If you add a canvas and various UI elements as a child of an Image Target, it should be enabling and disabling upon tracking found and lost. Could you give this a try and let me know if it works for you?

    Thanks!
     
  3. herosuperman

    herosuperman

    Joined:
    Nov 9, 2017
    Posts:
    7
    Thank you..it worked fine.. and I want to add a custom notification on device screen while not getting any target images as 'no target found,keep scanning' like that. I would like to know can u help me with this one.?
     
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    One approach to achieving this would be to display some UI that has this message and then have a script that listens for target detections have access to this UI. When a detection occurs, you can hide the UI and when tracking is lost you can show the UI again.
     
  5. soul-of-creativity

    soul-of-creativity

    Joined:
    Jun 10, 2016
    Posts:
    2
    I want to make some UI elements to display once the image target has been detected and show the 3D model how can I make that ??
     
  6. ajth789

    ajth789

    Joined:
    Jan 17, 2019
    Posts:
    1
    Hey, how would I add a UI that displays flat on the screen (like and overlay) and not part of the 3D environment? for examples, button for selecting models.