Forum Discussion
Anonymous
11 years agoNew Unity UI + OVR Look-Based Input HOWTO
LookInputModule.jpg Edit6: version 5 of example project/code: https://www.dropbox.com/s/g8ptl7w9xdewp ... 5.zip?dl=0 Version removed old Oculus integration and uses Native VR support + 0.1.2 util...
Anonymous
11 years agoI figured it out by looking at the StandaloneInputModule code here:
https://gist.github.com/stramit/ce455682b7944bdff0e7
What I was missing was this procedure that handles the update events that need to get passed to the currently selected UI object:
I fixed it in the original post. I make a call to this function right at the beginning of the Process() function. This is what passes on the keyboard input events to the selected object.
Keep in mind, this doesn't disable all the key bindings made elsewhere in code, like in the OVR code. You will have to find a way to disable those other scripts from trying to also use the keystroke. OVR SDK has a lot of keyboard shortcuts.
https://gist.github.com/stramit/ce455682b7944bdff0e7
What I was missing was this procedure that handles the update events that need to get passed to the currently selected UI object:
private bool SendUpdateEventToSelectedObject() {
if (eventSystem.currentSelectedGameObject == null)
return false;
BaseEventData data = GetBaseEventData ();
ExecuteEvents.Execute (eventSystem.currentSelectedGameObject, data, ExecuteEvents.updateSelectedHandler);
return data.used;
}
I fixed it in the original post. I make a call to this function right at the beginning of the Process() function. This is what passes on the keyboard input events to the selected object.
Keep in mind, this doesn't disable all the key bindings made elsewhere in code, like in the OVR code. You will have to find a way to disable those other scripts from trying to also use the keystroke. OVR SDK has a lot of keyboard shortcuts.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 2 years ago
- 2 years ago
- 6 months ago