-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Left-click doesn't act as 'tap' in Unity Editor. #1537
Comments
I just tried this with the MixedRealityToolkit-Unity release for 2017.2.1f1 and Unity 2017.2.1f1. When I open the scene for example "TapToPlace", and run it in the editor I am unable to select a box and move it with "Control left-click". Previously, this worked with the older HoloToolkit, and I am unable to find how to trigger the IInputClickHandler events with the recent MixedRealityToolkit-Unity when running a scene in the editor. |
I'm experiencing same issues when trying to run my app in Editor. I am not sure how it is supposed to work at the moment. But I figured out things seem to work as the used to in the Editor, when: First, Turn off Virtual Reality Support in Player Settings. Next, Edit the script for CustomInputSelector: to just I discovered that the problem is that I had Mixed Reality portal installed, but did not want to use it and just test in the Unity Editor. However XRDevice.isPresent returns true when the portal is installed, even when no device is connected or running. So next thing I did: I uninstalled the Mixed Reality Portal (where this turned to a crash of Unity in previous versions this seems to be fixed now), and I toggled the Virtual Reality support back on and reverted the changes I made in CustomInputSelector. The result now is that things work correctly again in the Editor, because XRDevice.isPresent = false, so spawnControllers will be true. I think the ultimate fix would be an adjustment to CustomInputSelector where we can tell if we want to use the Editor or Mixed Reality Portal since XRDevice.isPresent is not reliable for that purpose. Maybe @StephenHodgson can shine some light on this. |
I'll be taking a look at this today. |
I found a more elegant solution that still takes editor into account:
|
I tried patching my local toolkit with #1550's changes. Works great! I am excited to be able to move to the latest MRTK. |
@GKersten, which version of Unity are you using? I'm unable to repro that with 2017.2.1f1 with the Mixed Reality Portal installed but no headset attached: The portal launches itself when I hit play in Unity, but tells me to connect a headset and focus stays in Unity. EDIT: I'm also unable to repro with 2017.3.0f3, and the portal doesn't launch anymore with this version. |
I'm also not having the problem in 2017.3.0f3.
|
StephenHodgson had submitted a PR, but this never got included. I found looking at his changes that if: |
No controllers in editor when: Controllers in editor when only: |
Pretty sure this was fixed.I was also unable to repro this. |
Overview
The mixed reality toolkit isn't recognizing the left-click (Shift and left mouse button) as an air tap when running a Mixed reality toolkit scene 'TapToPlace'.
Expected Behavior
The editor should also work with clicks -> airtap input for all scenes/scripts. This is required to test scenes in the editor before spending time to upload to the device.
Actual Behavior
Right mouse works to rotate screen, but "Shift + left-click" isn't creating input events for air taps. TapToPlace class implements IInputClickHandler, so it seems that the IInputClickHandler is generally broken in the editor with the current mixed reality toolkit unity branch.
Steps to reproduce
Unity Editor Version
Mixed Reality Toolkit Release Version
Latest master branch as of 2017 December 14th (a7c059cac50204c.. commit).
The text was updated successfully, but these errors were encountered: