Jump to content
Happy Holidays! Limited Staff Responses: 1/20 - 1/31 ×

trigger event


1128
 Share

Recommended Posts

i have added toggle button in the scene but unable to trigger the event, Button to Trigger is set to Trigger

what i m missing here.. 

script is below

 

private void Update()
{
if (!checkAxis)
{
if (WaveVR_Controller.Input(this.DeviceType).GetTouchDown(WVR_InputId.WVR_InputId_Alias1_Touchpad))
{
display.text = "Toched tochpad";
}
if (WaveVR_Controller.Input(this.DeviceType).GetPressDown(WVR_InputId.WVR_InputId_Alias1_Digital_Trigger))
{
display.text = "digital trigger pressed";
}
if (WaveVR_Controller.Input(this.DeviceType).GetPressDown(WVR_InputId.WVR_InputId_Alias1_Trigger))
{
display.text = " trigger pressed";
}
if (WaveVR_Controller.Input(this.DeviceType).GetPressDown(WVR_InputId.WVR_InputId_Alias1_Volume_Up))
{
display.text = " volume up pressed";
}
if (WaveVR_Controller.Input(this.DeviceType).GetPressDown(WVR_InputId.WVR_InputId_Alias1_Volume_Down))
{
display.text = " volume down pressed";
}
if (WaveVR_Controller.Input(this.DeviceType).GetPressDown(WVR_InputId.WVR_InputId_Alias1_Menu))
{
display.text = " menu pressed";
}
}
else
{
Vector2 axis = WaveVR_Controller.Input(this.DeviceType).GetAxis(WVR_InputId.WVR_InputId_Alias1_Touchpad);
display.text = axis.ToString();
}

Link to comment
Share on other sites

it worked for me first time but when i take build again click on the button are not working

i m getting error in the unity editor say

UnityException: Tag: EventCanvas is not defined.

 

please let me know what i m missing here

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...