Skip to content

Commit

Permalink
Update to v1.7.2
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
lawwong committed Nov 16, 2017
2 parents 18adab6 + 39bbaaf commit bae8c18
Show file tree
Hide file tree
Showing 24 changed files with 1,936 additions and 993 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
/[Bb]uilds/
/[Pp]ackages/
/.vs/
/UnityPackageManager/

ProjectSettings/*
!ProjectSettings/EditorSettings.asset

Assets/*
!Assets/HTC.UnityPlugin/
!Assets/HTC.UnityPlugin.meta
Assets/HTC.UnityPlugin/ViveInputUtility/changelog.txt
Assets/HTC.UnityPlugin/ViveInputUtility/changelog.txt.meta

*.cfg

Expand Down
21 changes: 21 additions & 0 deletions Assets/HTC.UnityPlugin/Pointer3D/ExecutePointer3DEvents.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//========= Copyright 2016-2017, HTC Corporation. All rights reserved. ===========

using UnityEngine.EventSystems;

namespace HTC.UnityPlugin.Pointer3D
{
public static class ExecutePointer3DEvents
{
public static readonly ExecuteEvents.EventFunction<IPointer3DPressEnterHandler> PressEnterHandler = Execute;
private static void Execute(IPointer3DPressEnterHandler handler, BaseEventData eventData)
{
handler.OnPointer3DPressEnter(ExecuteEvents.ValidateEventData<Pointer3DEventData>(eventData));
}

public static readonly ExecuteEvents.EventFunction<IPointer3DPressExitHandler> PressExitHandler = Execute;
private static void Execute(IPointer3DPressExitHandler handler, BaseEventData eventData)
{
handler.OnPointer3DPressExit(ExecuteEvents.ValidateEventData<Pointer3DEventData>(eventData));
}
}
}
12 changes: 12 additions & 0 deletions Assets/HTC.UnityPlugin/Pointer3D/ExecutePointer3DEvents.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions Assets/HTC.UnityPlugin/Pointer3D/Pointer3DEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public class Pointer3DEventData : PointerEventData
public Quaternion pressRotation;

public float pressDistance;
public GameObject pressEnter;

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

public virtual bool GetPressUp() { return false; }

public override string ToString()
{
var str = string.Empty;
str += "eligibleForClick: " + eligibleForClick + "\n";
str += "pointerEnter: " + Pointer3DInputModule.PrintGOPath(pointerEnter) + "\n";
str += "pointerPress: " + Pointer3DInputModule.PrintGOPath(pointerPress) + "\n";
str += "lastPointerPress: " + Pointer3DInputModule.PrintGOPath(lastPress) + "\n";
str += "pressEnter: " + Pointer3DInputModule.PrintGOPath(pressEnter) + "\n";
str += "pointerDrag: " + Pointer3DInputModule.PrintGOPath(pointerDrag) + "\n";
return str;
}
}
}
16 changes: 16 additions & 0 deletions Assets/HTC.UnityPlugin/Pointer3D/Pointer3DEventInterfaces.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//========= Copyright 2016-2017, HTC Corporation. All rights reserved. ===========

using UnityEngine.EventSystems;

namespace HTC.UnityPlugin.Pointer3D
{
public interface IPointer3DPressEnterHandler : IEventSystemHandler
{
void OnPointer3DPressEnter(Pointer3DEventData eventData);
}

public interface IPointer3DPressExitHandler : IEventSystemHandler
{
void OnPointer3DPressExit(Pointer3DEventData eventData);
}
}
12 changes: 12 additions & 0 deletions Assets/HTC.UnityPlugin/Pointer3D/Pointer3DEventInterfaces.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bae8c18

Please sign in to comment.