Fixed QuestManifest generation

This commit is contained in:
Pascal Serrarens 2023-01-13 18:12:09 +01:00
parent f447b2b301
commit cfc3b22c00
2 changed files with 4 additions and 2 deletions

View File

@ -219,7 +219,7 @@ namespace Passer.Humanoid {
for (int i = 0; i < hcScripts.Length; i++) { for (int i = 0; i < hcScripts.Length; i++) {
string assetPath = AssetDatabase.GUIDToAssetPath(hcScripts[i]); string assetPath = AssetDatabase.GUIDToAssetPath(hcScripts[i]);
if (assetPath.Length > 36 && assetPath.Substring(assetPath.Length - 27, 27) == "/Scripts/HumanoidControl.cs") { 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; return humanoidPath;
} }
} }

View File

@ -71,7 +71,9 @@ namespace Passer.Humanoid {
return; return;
string humanoidPath = Configuration_Editor.FindHumanoidFolder(); 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); File.Copy(questManifestPath, manifestPath);
} }
catch (System.Exception _) { catch (System.Exception _) {