- Home /
Question by
solutionlab · Dec 03, 2019 at 10:12 AM ·
uibuttonvrsteam
Interaction with UI using SteamVR
Hello all, I am having some trouble with building an UI for my VR application... I created a Canvas(Worldspace) and Buttons in it. I read this post and did everything as described but it does not work in my project... In the picture you can see the setup of my button "pressed".
For my pointer I watched this video an it worked. But the Interaction with my button does not work.. The buttonhover (highlighted) works fine as you can see in the picture
Here is the function I call when button is clicked:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
using Valve.VR.InteractionSystem;
public class ButtonTest : MonoBehaviour
{
public void OutPut()
{
Debug.Log("pressed");
}
}
How is it possible to click the button e.g with the trigger and calling the OnHandClick of the button?
Hoping for some help. Thanks!
buttoninformation.png
(106.9 kB)
buttonhover.png
(87.1 kB)
Comment