Fixed for hand tracking
This commit is contained in:
parent
d11396b8bc
commit
16f6d72219
@ -62,19 +62,23 @@ namespace Passer.Humanoid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void CheckQuestManifest() {
|
protected virtual void CheckQuestManifest() {
|
||||||
string manifestPath = Application.dataPath + "/Plugins/Android/AndroidManifest.xml";
|
try {
|
||||||
FileInfo fileInfo = new FileInfo(manifestPath);
|
string manifestPath = Application.dataPath + "/Plugins/Android/AndroidManifest.xml";
|
||||||
fileInfo.Directory.Create();
|
FileInfo fileInfo = new FileInfo(manifestPath);
|
||||||
bool manifestAvailable = File.Exists(manifestPath);
|
fileInfo.Directory.Create();
|
||||||
if (manifestAvailable)
|
bool manifestAvailable = File.Exists(manifestPath);
|
||||||
|
if (manifestAvailable)
|
||||||
|
return;
|
||||||
|
|
||||||
|
string humanoidPath = Configuration_Editor.FindHumanoidFolder();
|
||||||
|
string questManifestPath = Application.dataPath + humanoidPath + "Extensions/Oculus/QuestManifest.xml";
|
||||||
|
File.Copy(questManifestPath, manifestPath);
|
||||||
|
}
|
||||||
|
catch (System.Exception _) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
string humanoidPath = Configuration_Editor.FindHumanoidFolder();
|
|
||||||
string questManifestPath = Application.dataPath + humanoidPath + "Extensions/Oculus/QuestManifest.xml";
|
|
||||||
File.Copy(questManifestPath, manifestPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void ViveHandTrackingInspector(HumanoidControl humanoid) {
|
protected void ViveHandTrackingInspector(HumanoidControl humanoid) {
|
||||||
#if hVIVEHAND
|
#if hVIVEHAND
|
||||||
GUIContent labelText = new GUIContent(
|
GUIContent labelText = new GUIContent(
|
||||||
@ -146,7 +150,7 @@ namespace Passer.Humanoid {
|
|||||||
public HandTargetProps(SerializedObject serializedObject, HandTarget handTarget)
|
public HandTargetProps(SerializedObject serializedObject, HandTarget handTarget)
|
||||||
: base(serializedObject, handTarget.unityXR, handTarget, "unityXR") {
|
: base(serializedObject, handTarget.unityXR, handTarget, "unityXR") {
|
||||||
|
|
||||||
controllerProp = serializedObject.FindProperty("unityXR.controller");
|
controllerProp = serializedObject.FindProperty("unityXR.sensorComponent");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Inspector() {
|
public override void Inspector() {
|
||||||
|
@ -8,7 +8,7 @@ namespace Passer.Humanoid {
|
|||||||
#if pUNITYXR
|
#if pUNITYXR
|
||||||
public override string name => "Unity XR";
|
public override string name => "Unity XR";
|
||||||
|
|
||||||
public override HumanoidTracker tracker => humanoid.unityXR;
|
public new UnityXRTracker tracker => humanoid.unityXR;
|
||||||
protected UnityXR unityXR => humanoid.unityXR.trackerComponent as UnityXR;
|
protected UnityXR unityXR => humanoid.unityXR.trackerComponent as UnityXR;
|
||||||
|
|
||||||
#region Manage
|
#region Manage
|
||||||
@ -72,12 +72,12 @@ namespace Passer.Humanoid {
|
|||||||
SetSensor2Target();
|
SetSensor2Target();
|
||||||
|
|
||||||
#if UNITY_ANDROID && hOCHAND
|
#if UNITY_ANDROID && hOCHAND
|
||||||
if (unityXR.oculusHandTracking)
|
if (tracker.oculusHandTracking)
|
||||||
handSkeleton = OculusHandSkeleton.Get(unityXR.trackerComponent.transform, handTarget.isLeft);
|
handSkeleton = OculusHandSkeleton.Get(unityXR.transform, handTarget.isLeft);
|
||||||
#endif
|
#endif
|
||||||
#if hVIVEHAND
|
#if hVIVEHAND
|
||||||
if (unityXR.viveHandTracking)
|
if (tracker.viveHandTracking)
|
||||||
handSkeleton = ViveHandSkeleton.Get(unityXR.trackerComponent.transform, handTarget.isLeft);
|
handSkeleton = ViveHandSkeleton.Get(unityXR.transform, handTarget.isLeft);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 915fef2fbd335ba4bb0f1d9d5e983783
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
Loading…
x
Reference in New Issue
Block a user