Search Unity

How in Unity of action of the button to attach to AR-objects (ImageTarget)?

Discussion in 'AR/VR (XR) Discussion' started by econordit, Feb 18, 2019.

  1. econordit

    econordit

    Joined:
    Feb 18, 2019
    Posts:
    1
    There are several ImageTargets, and there are three buttons in the interface, when you click, the sound plays (voicing in three languages). How can I attach an action to ImageTarget? sounds should be played according to the purpose of the image.
     
    Last edited: Feb 18, 2019
  2. InakiAndres

    InakiAndres

    Joined:
    Jan 9, 2019
    Posts:
    19
    I can't understand the problem, but if u want to interact with the objects in ar u can use a raycast, but if u wanna interact with other objects like ui its easy, like in other apps without AR.

    OK, i think u want to reproduce sound when the imagetarget is on screen, in that case put the code in the ONEnable of that object.