Skip to content

Commit 45b4e46

Browse files
author
srl87
committed
version 2.2.0
1 parent 11b730e commit 45b4e46

File tree

211 files changed

+107823
-1134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+107823
-1134
lines changed

com.htc.upm.vive.openxr/Editor/AndroidManifestProcess.cs

Lines changed: 52 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
using UnityEngine;
1212
using UnityEngine.XR.OpenXR;
1313
using UnityEngine.XR.OpenXR.Features;
14+
using UnityEngine.XR.OpenXR.Features.Interactions;
15+
using VIVE.OpenXR.FacialTracking;
1416
using VIVE.OpenXR.Hand;
1517
using VIVE.OpenXR.Tracker;
1618

@@ -249,54 +251,75 @@ internal void AddOpenXRPermission()
249251

250252
internal void AddOpenXRFeatures()
251253
{
252-
bool enableViveWristTracker = false;
253-
bool enableViveHandTracking = false;
254+
bool enableHandtracking = false;
255+
bool enableTracker = false;
256+
bool enableEyetracking = false;
257+
bool enableLipexpression = false;
258+
254259
var settings = OpenXRSettings.GetSettingsForBuildTargetGroup(BuildTargetGroup.Android);
255260
if (null == settings)
256261
return;
257262

258263
foreach (var feature in settings.GetFeatures<OpenXRInteractionFeature>())
259264
{
260-
if (feature is ViveWristTracker)
265+
if ((feature is ViveWristTracker || feature is ViveXRTracker) && feature.enabled)
261266
{
262-
enableViveWristTracker = feature.enabled;
263-
break;
267+
enableHandtracking = true;
268+
enableTracker = true;
264269
}
265-
}
266-
267-
foreach (var feature in settings.GetFeatures<OpenXRFeature>())
268-
{
269-
if (feature is ViveHandTracking)
270+
if (feature is EyeGazeInteraction && feature.enabled)
271+
{
272+
enableEyetracking = true;
273+
}
274+
if (feature is ViveHandInteraction && feature.enabled)
270275
{
271-
enableViveHandTracking = feature.enabled;
272-
break; ;
276+
enableHandtracking = true;
273277
}
274278
}
275279

276-
//Debug.Log("enableViveWristTracker " + enableViveWristTracker);
277-
if (enableViveWristTracker)
280+
foreach (var feature in settings.GetFeatures<OpenXRFeature>())
278281
{
282+
if (feature is ViveHandTracking && feature.enabled)
279283
{
280-
var newUsesFeature = CreateElement("uses-feature");
281-
newUsesFeature.Attributes.Append(CreateAndroidAttribute("name", "wave.feature.handtracking"));
282-
newUsesFeature.Attributes.Append(CreateAndroidAttribute("required", "true"));
283-
ManifestElement.AppendChild(newUsesFeature);
284+
enableHandtracking = true;
284285
}
286+
if (feature is ViveFacialTracking && feature.enabled)
285287
{
286-
var newUsesFeature = CreateElement("uses-feature");
287-
newUsesFeature.Attributes.Append(CreateAndroidAttribute("name", "wave.feature.tracker"));
288-
newUsesFeature.Attributes.Append(CreateAndroidAttribute("required", "true"));
289-
ManifestElement.AppendChild(newUsesFeature);
288+
enableEyetracking = true;
289+
enableLipexpression = true;
290290
}
291291
}
292-
else if (enableViveHandTracking)
292+
293+
if (enableHandtracking)
293294
{
294-
{
295-
var newUsesFeature = CreateElement("uses-feature");
296-
newUsesFeature.Attributes.Append(CreateAndroidAttribute("name", "wave.feature.handtracking"));
297-
newUsesFeature.Attributes.Append(CreateAndroidAttribute("required", "true"));
298-
ManifestElement.AppendChild(newUsesFeature);
299-
}
295+
var newUsesFeature = CreateElement("uses-feature");
296+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("name", "wave.feature.handtracking"));
297+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("required", "true"));
298+
ManifestElement.AppendChild(newUsesFeature);
299+
}
300+
301+
if (enableTracker)
302+
{
303+
var newUsesFeature = CreateElement("uses-feature");
304+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("name", "wave.feature.tracker"));
305+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("required", "true"));
306+
ManifestElement.AppendChild(newUsesFeature);
307+
}
308+
309+
if (enableEyetracking)
310+
{
311+
var newUsesFeature = CreateElement("uses-feature");
312+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("name", "wave.feature.eyetracking"));
313+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("required", "true"));
314+
ManifestElement.AppendChild(newUsesFeature);
315+
}
316+
317+
if (enableLipexpression)
318+
{
319+
var newUsesFeature = CreateElement("uses-feature");
320+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("name", "wave.feature.lipexpression"));
321+
newUsesFeature.Attributes.Append(CreateAndroidAttribute("required", "true"));
322+
ManifestElement.AppendChild(newUsesFeature);
300323
}
301324

302325
if (CheckIfSimultaneousInteractionEnabled.IsEnabled)

com.htc.upm.vive.openxr/Editor/ViveOpenXRBuildCheck.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static bool HasScriptingDefineSymbols(ScriptingDefinedSettings setting)
101101

102102
return true;
103103
}
104-
static void OnUpdate()
104+
static void CheckScriptingDefineSymbols()
105105
{
106106
// Adds the script symbol if Vive OpenXR Plugin - Android is imported and assigned in XR Plugin-in Management.
107107
if (ViveOpenXRAndroidAssigned)
@@ -122,6 +122,10 @@ static void OnUpdate()
122122
}
123123
}
124124
}
125+
static void OnUpdate()
126+
{
127+
//CheckScriptingDefineSymbols();
128+
}
125129
static CheckIfVIVEEnabled()
126130
{
127131
EditorApplication.update += OnUpdate;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:608e74b9bbcef282f943922fd50525319ec7a16d599107fee900b002dddba018
3-
size 11782272
2+
oid sha256:8b83f1eac500f8c012a25f6bb8bb9009922ad0609c1c5f35ee747f54c25646b1
3+
size 14528336
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:658d03cfd36e12406d704e8ca5ceb3399932dca855767d068672a2d07f6a1370
3+
size 13024021

com.htc.upm.vive.openxr/Runtime/Android/openxr_loader.aar.meta

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

com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayer.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
// "VIVE SDK
2-
// © 2020 HTC Corporation. All Rights Reserved.
3-
//
4-
// Unless otherwise required by copyright law and practice,
5-
// upon the execution of HTC SDK license agreement,
6-
// HTC grants you access to and use of the VIVE SDK(s).
7-
// You shall fully comply with all of HTC’s SDK license agreement terms and
8-
// conditions signed by you and all SDK and API requirements,
9-
// specifications, and documentation provided by HTC to You."
1+
// Copyright HTC Corporation All Rights Reserved.
102

113
using System;
124
using UnityEngine;

com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerManager.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
// "VIVE SDK
2-
// © 2020 HTC Corporation. All Rights Reserved.
3-
//
4-
// Unless otherwise required by copyright law and practice,
5-
// upon the execution of HTC SDK license agreement,
6-
// HTC grants you access to and use of the VIVE SDK(s).
7-
// You shall fully comply with all of HTC’s SDK license agreement terms and
8-
// conditions signed by you and all SDK and API requirements,
9-
// specifications, and documentation provided by HTC to You."
1+
// Copyright HTC Corporation All Rights Reserved.
102

113
using System;
124
using System.Collections;

com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerPassthroughAPI.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright HTC Corporation All Rights Reserved.
2+
13
using System.Collections;
24
using System.Collections.Generic;
35
using System.Runtime.InteropServices;

com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerRenderThreadSyncObject.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
// "VIVE SDK
2-
// © 2020 HTC Corporation. All Rights Reserved.
3-
//
4-
// Unless otherwise required by copyright law and practice,
5-
// upon the execution of HTC SDK license agreement,
6-
// HTC grants you access to and use of the VIVE SDK(s).
7-
// You shall fully comply with all of HTC’s SDK license agreement terms and
8-
// conditions signed by you and all SDK and API requirements,
9-
// specifications, and documentation provided by HTC to You."
1+
// Copyright HTC Corporation All Rights Reserved.
102

113
using AOT;
124
using System;

com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerUICanvas.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
// "VIVE SDK
2-
// © 2020 HTC Corporation. All Rights Reserved.
3-
//
4-
// Unless otherwise required by copyright law and practice,
5-
// upon the execution of HTC SDK license agreement,
6-
// HTC grants you access to and use of the VIVE SDK(s).
7-
// You shall fully comply with all of HTC’s SDK license agreement terms and
8-
// conditions signed by you and all SDK and API requirements,
9-
// specifications, and documentation provided by HTC to You."
1+
// Copyright HTC Corporation All Rights Reserved.
102

113
using System.Collections;
124
using System.Collections.Generic;

0 commit comments

Comments
 (0)