From cfc3b22c00e18e5ff68bd5b5a72d914dfe8877b4 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Fri, 13 Jan 2023 18:12:09 +0100 Subject: [PATCH] Fixed QuestManifest generation --- Editor/HumanoidControl/Configuration_Editor.cs | 2 +- Editor/HumanoidControl/Extensions/UnityXR/UnityXR_Editor.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Editor/HumanoidControl/Configuration_Editor.cs b/Editor/HumanoidControl/Configuration_Editor.cs index bc4289c..099260e 100644 --- a/Editor/HumanoidControl/Configuration_Editor.cs +++ b/Editor/HumanoidControl/Configuration_Editor.cs @@ -219,7 +219,7 @@ namespace Passer.Humanoid { for (int i = 0; i < hcScripts.Length; i++) { string assetPath = AssetDatabase.GUIDToAssetPath(hcScripts[i]); if (assetPath.Length > 36 && assetPath.Substring(assetPath.Length - 27, 27) == "/Scripts/HumanoidControl.cs") { - humanoidPath = assetPath.Substring(6, assetPath.Length - 24); + humanoidPath = assetPath.Substring(0, assetPath.Length - 18); return humanoidPath; } } diff --git a/Editor/HumanoidControl/Extensions/UnityXR/UnityXR_Editor.cs b/Editor/HumanoidControl/Extensions/UnityXR/UnityXR_Editor.cs index deb8e76..453440b 100644 --- a/Editor/HumanoidControl/Extensions/UnityXR/UnityXR_Editor.cs +++ b/Editor/HumanoidControl/Extensions/UnityXR/UnityXR_Editor.cs @@ -71,7 +71,9 @@ namespace Passer.Humanoid { return; string humanoidPath = Configuration_Editor.FindHumanoidFolder(); - string questManifestPath = Application.dataPath + humanoidPath + "Extensions/Oculus/QuestManifest.xml"; + string questManifestPath = Application.dataPath.Substring(0, Application.dataPath.Length - 6) + // remove /Assets + humanoidPath + "Extensions/Oculus/QuestManifest.xml"; + Debug.Log(questManifestPath); File.Copy(questManifestPath, manifestPath); } catch (System.Exception _) {