Skip to content

Commit bae8c18

Browse files
author
lawwong
committed
Update to v1.7.2
* New features - Add recommended VR project settings notification window * Bug fix - Fix compile error in Unity 5.5/5.6 - [VRModule] Fix UnityEngineVRModule not removing disappeared device correctly - In Unity 2017.2, InputTracking.GetNodeStates sometimes returns ghost nodes at the beginning of play mode. - [Teleportable] Remove a potential null reference - This happens when SteamVR plugin is imported and no SteamVR_Camera exist. * Improvement - [Pointer3D] Now Pointer3DInputModule shows status in EventSystem's inspector preview window - [Pointer3D] Let Pointer3DInputModule behave more consistent with StandaloneInputModule - Now IPointerEnterHandler / IPointerExitHandler only triggered once for each pointer, pressing buttons won't trigger Enter/Exit anymore. - [Pointer3D] Add IPointer3DPressEnterHandler / IPointer3DPressExitHandler - Their behaviours are like IPointerEnterHandler/IPointerExitHandler, but press enter happend when the button is pressed and moved in, and press exit on button released or pointer moved out. - [SteamVRCameraHook] Fix not expending head-eye-ear correctly - [VRModule] Fix update timing issue - This fix VivePoseTracker tracking is delayed in editor playing mode.
2 parents 18adab6 + 39bbaaf commit bae8c18

24 files changed

+1936
-993
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
/[Bb]uilds/
66
/[Pp]ackages/
77
/.vs/
8+
/UnityPackageManager/
89

910
ProjectSettings/*
1011
!ProjectSettings/EditorSettings.asset
1112

1213
Assets/*
1314
!Assets/HTC.UnityPlugin/
1415
!Assets/HTC.UnityPlugin.meta
16+
Assets/HTC.UnityPlugin/ViveInputUtility/changelog.txt
17+
Assets/HTC.UnityPlugin/ViveInputUtility/changelog.txt.meta
1518

1619
*.cfg
1720

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//========= Copyright 2016-2017, HTC Corporation. All rights reserved. ===========
2+
3+
using UnityEngine.EventSystems;
4+
5+
namespace HTC.UnityPlugin.Pointer3D
6+
{
7+
public static class ExecutePointer3DEvents
8+
{
9+
public static readonly ExecuteEvents.EventFunction<IPointer3DPressEnterHandler> PressEnterHandler = Execute;
10+
private static void Execute(IPointer3DPressEnterHandler handler, BaseEventData eventData)
11+
{
12+
handler.OnPointer3DPressEnter(ExecuteEvents.ValidateEventData<Pointer3DEventData>(eventData));
13+
}
14+
15+
public static readonly ExecuteEvents.EventFunction<IPointer3DPressExitHandler> PressExitHandler = Execute;
16+
private static void Execute(IPointer3DPressExitHandler handler, BaseEventData eventData)
17+
{
18+
handler.OnPointer3DPressExit(ExecuteEvents.ValidateEventData<Pointer3DEventData>(eventData));
19+
}
20+
}
21+
}

Assets/HTC.UnityPlugin/Pointer3D/ExecutePointer3DEvents.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/HTC.UnityPlugin/Pointer3D/Pointer3DEventData.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public class Pointer3DEventData : PointerEventData
6565
public Quaternion pressRotation;
6666

6767
public float pressDistance;
68+
public GameObject pressEnter;
6869

6970
public Pointer3DEventData(Pointer3DRaycaster ownerRaycaster, EventSystem eventSystem) : base(eventSystem)
7071
{
@@ -77,5 +78,17 @@ public Pointer3DEventData(Pointer3DRaycaster ownerRaycaster, EventSystem eventSy
7778
public virtual bool GetPressDown() { return false; }
7879

7980
public virtual bool GetPressUp() { return false; }
81+
82+
public override string ToString()
83+
{
84+
var str = string.Empty;
85+
str += "eligibleForClick: " + eligibleForClick + "\n";
86+
str += "pointerEnter: " + Pointer3DInputModule.PrintGOPath(pointerEnter) + "\n";
87+
str += "pointerPress: " + Pointer3DInputModule.PrintGOPath(pointerPress) + "\n";
88+
str += "lastPointerPress: " + Pointer3DInputModule.PrintGOPath(lastPress) + "\n";
89+
str += "pressEnter: " + Pointer3DInputModule.PrintGOPath(pressEnter) + "\n";
90+
str += "pointerDrag: " + Pointer3DInputModule.PrintGOPath(pointerDrag) + "\n";
91+
return str;
92+
}
8093
}
8194
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//========= Copyright 2016-2017, HTC Corporation. All rights reserved. ===========
2+
3+
using UnityEngine.EventSystems;
4+
5+
namespace HTC.UnityPlugin.Pointer3D
6+
{
7+
public interface IPointer3DPressEnterHandler : IEventSystemHandler
8+
{
9+
void OnPointer3DPressEnter(Pointer3DEventData eventData);
10+
}
11+
12+
public interface IPointer3DPressExitHandler : IEventSystemHandler
13+
{
14+
void OnPointer3DPressExit(Pointer3DEventData eventData);
15+
}
16+
}

Assets/HTC.UnityPlugin/Pointer3D/Pointer3DEventInterfaces.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)