Skip to content

Commit

Permalink
Update to v1.10.2
Browse files Browse the repository at this point in the history
* Improvement
  - [ViveInput] Add new procedure vibration API (only works with SteamVR v2)
```csharp
using HTC.UnityPlugin.Vive;
ViveInput.TriggerHapticVibrationEx<TRole>(
      TRole role,
      float durationSeconds = 0.01f,
      float frequency = 85f,
      float amplitude = 0.125f,
      float startSecondsFromNow = 0f)
```

* Bug Fix
  - [ViveInput] Fix issue that TriggerHapticPulse is not working
  - [Utility] Fix bug in IndexedSet indexer setter.
  - [WaveVRModule] Fix VIU example freezes after launched
  - [OculusVRModule] Fix OculusVRModule not recognizing GearVR or OculusGO correctly
  - [ExternalCamera] Fix not working with SteamVR v2
  - [ExternalCamera] Fix SteamVR_ExternalCamera setting sceneResolutionScale incorrectly in some cases
  - [ExternalCamera] Fix potential RenderTexture created by SteamVR_ExternalCamera having incorrect ColorSpace
  • Loading branch information
lawwong committed Jan 23, 2019
2 parents cdf181b + 5ab7326 commit 054041e
Show file tree
Hide file tree
Showing 140 changed files with 625 additions and 172 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System.Collections.Generic;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/ColliderEvent/ColliderEventData.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine.EventSystems;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine.EventSystems;

Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Pointer3D/ExecutePointer3DEvents.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine.EventSystems;

Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Pointer3D/Pointer3DEventData.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;
using UnityEngine.EventSystems;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine.EventSystems;

Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Pointer3D/Pointer3DInputModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;
using HTC.UnityPlugin.Utility;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;
using UnityEngine.EventSystems;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;
using UnityEngine.EventSystems;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEngine;
using UnityEngine.EventSystems;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/PoseTracker/Base/BasePoseTracker.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/PoseTracker/Base/IPoseModifier.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/PoseTracker/Base/IPoseTracker.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

namespace HTC.UnityPlugin.PoseTracker
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEditor;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using UnityEditor;
using UnityEngine;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/PoseTracker/Pose.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using UnityEngine;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/PoseTracker/PoseTracker.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;
using UnityEditor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using UnityEngine;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Utility/ChangeProp.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using System.Collections.Generic;
Expand Down
6 changes: 3 additions & 3 deletions Assets/HTC.UnityPlugin/Utility/Container/IndexedSet.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using System.Collections;
Expand Down Expand Up @@ -70,7 +70,7 @@ public T this[int index]
T item = m_List[index];
m_Dictionary.Remove(item);
m_List[index] = value;
m_Dictionary.Add(item, index);
m_Dictionary.Add(value, index);
}
}

Expand Down Expand Up @@ -193,4 +193,4 @@ public ReadOnlyCollection<T> AsReadOnly()
return m_List.AsReadOnly();
}
}
}
}
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Utility/Container/IndexedTable.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using System.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

namespace HTC.UnityPlugin.Utility
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

namespace HTC.UnityPlugin.Utility
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Utility/ContainerPool/ListPool.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System.Collections.Generic;

Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Utility/ContainerPool/ObjectPool.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using System.Collections.Generic;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Utility/EnumUtils.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using System.Collections.Generic;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Utility/RigidPose.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using UnityEngine;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/Utility/SingletonBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using UnityEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.Utility;
using UnityEditor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/VRModule/Modules/GoogleVRModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

#if VIU_GOOGLEVR && UNITY_5_6_OR_NEWER

Expand Down
24 changes: 17 additions & 7 deletions Assets/HTC.UnityPlugin/VRModule/Modules/OculusVRModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 2016-2018, HTC Corporation. All rights reserved. ===========
//========= Copyright 2016-2019, HTC Corporation. All rights reserved. ===========

#if VIU_OCULUSVR
using UnityEngine;
Expand Down Expand Up @@ -141,7 +141,8 @@ public override void BeforeRenderUpdate()
// update device connected state
if (!prevState.isConnected)
{
var ovrProductName = OVRPlugin.productName;
var platform = OVRPlugin.GetSystemHeadsetType();
var ovrProductName = platform.ToString();
var deviceClass = s_node2class[(int)node];

currState.isConnected = true;
Expand All @@ -160,15 +161,24 @@ public override void BeforeRenderUpdate()
currState.deviceModel = VRModuleDeviceModel.OculusSensor;
break;
case VRModuleDeviceClass.Controller:
switch (ovrProductName)
switch (platform)
{
case "Oculus Go":
case OVRPlugin.SystemHeadset.Oculus_Go:
currState.deviceModel = VRModuleDeviceModel.OculusGoController;
break;
case "Gear VR":

case OVRPlugin.SystemHeadset.GearVR_R320:
case OVRPlugin.SystemHeadset.GearVR_R321:
case OVRPlugin.SystemHeadset.GearVR_R322:
case OVRPlugin.SystemHeadset.GearVR_R323:
case OVRPlugin.SystemHeadset.GearVR_R324:
case OVRPlugin.SystemHeadset.GearVR_R325:
currState.deviceModel = VRModuleDeviceModel.OculusGearVrController;
break;
case "Oculus Rift":

case OVRPlugin.SystemHeadset.Rift_DK1:
case OVRPlugin.SystemHeadset.Rift_DK2:
case OVRPlugin.SystemHeadset.Rift_CV1:
default:
switch (node)
{
Expand Down Expand Up @@ -288,4 +298,4 @@ public override void BeforeRenderUpdate()
}
#endif
}
}
}
Loading

0 comments on commit 054041e

Please sign in to comment.