Skip to content

Commit

Permalink
Merge dev into this
Browse files Browse the repository at this point in the history
  • Loading branch information
mtschoen-unity committed Sep 23, 2016
2 parents 1564f89 + 163b2a9 commit cdcad9d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
9 changes: 0 additions & 9 deletions Models/Materials.meta

This file was deleted.

15 changes: 10 additions & 5 deletions Scripts/EditorVR.cs
Expand Up @@ -189,7 +189,7 @@ private void OnDisable()

private void OnSceneGUI(EditorWindow obj)
{
if (Event.current.type == EventType.MouseMove)
if (Event.current.type == EventType.ExecuteCommand)
{
var miniWorldRayHasObject = false;

Expand Down Expand Up @@ -258,10 +258,15 @@ private void Update()

UpdateMiniWorldRays();
#if UNITY_EDITOR
// HACK: Send a "mouse moved" event, so scene picking can occur for the controller
Event e = new Event();
e.type = EventType.MouseMove;
VRView.activeView.SendEvent(e);
// HACK: Send a custom event, so that OnSceneGUI gets called, which is requirement for scene picking to occur
// Additionally, on some machines it's required to do a delay call otherwise none of this works
EditorApplication.delayCall += () =>
{
Event e = new Event();
e.type = EventType.ExecuteCommand;
if (this != null) // Because this is a delay call, the component will be null when EditorVR closes
VRView.activeView.SendEvent(e);
};
#endif
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit cdcad9d

Please sign in to comment.