Jump to content

trigger event


1128

Recommended Posts

Posted

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();
}

Posted

button clicks are now working. i was missing to attached "WaveVR_AddEventSystemGUI" script to canvas.

thank you 

Posted

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...