diff --git a/Assets/Plugins/Android/Pojlib-debug.aar b/Assets/Plugins/Android/Pojlib-debug.aar index 795eb352..3069c5f8 100644 Binary files a/Assets/Plugins/Android/Pojlib-debug.aar and b/Assets/Plugins/Android/Pojlib-debug.aar differ diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index bb9e25f7..a90c2ba7 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -7965,6 +7965,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ea87d112f0ba8ad439f17cb8309ff273, type: 3} m_Name: m_EditorClassIdentifier: + isMainScreen: 0 loginButtonText: {fileID: 1874211728} handler: {fileID: 1460469781} --- !u!1 &442830766 @@ -13398,6 +13399,8 @@ MonoBehaviour: uiHandler: {fileID: 1460469782} instancesDropdown: {fileID: 194192002} configHandler: {fileID: 766335867} + loginHandler: {fileID: 432457120} + instanceButton: {fileID: 1460469786} --- !u!4 &766335866 Transform: m_ObjectHideFlags: 0 @@ -15130,7 +15133,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &844569212 Transform: m_ObjectHideFlags: 0 @@ -30761,6 +30764,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ea87d112f0ba8ad439f17cb8309ff273, type: 3} m_Name: m_EditorClassIdentifier: + isMainScreen: 0 loginButtonText: {fileID: 460482964} handler: {fileID: 1460469781} --- !u!114 &1588127161 @@ -42145,7 +42149,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &2039886949 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/ConfigHandler.cs b/Assets/Scripts/ConfigHandler.cs index b5882e33..8f5704cb 100644 --- a/Assets/Scripts/ConfigHandler.cs +++ b/Assets/Scripts/ConfigHandler.cs @@ -18,7 +18,7 @@ public void LoadConfig() string configFile = File.ReadAllText(configPath); config = JsonConvert.DeserializeObject(configFile); - if (!config.acceptedLegal) { windowHandler.LegalSetter(); } + // if (!config.acceptedLegal) { windowHandler.LegalSetter(); } if (config.setDevMods) { devHandler._devToggle.isOn = true; } if (config.setCustomRAM) { diff --git a/Assets/Scripts/JNIStorage.cs b/Assets/Scripts/JNIStorage.cs index 45719016..70c792d6 100644 --- a/Assets/Scripts/JNIStorage.cs +++ b/Assets/Scripts/JNIStorage.cs @@ -1,3 +1,4 @@ +using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; @@ -15,8 +16,16 @@ public class JNIStorage : MonoBehaviour public UIHandler uiHandler; public TMP_Dropdown instancesDropdown; public ConfigHandler configHandler; + public LoginHandler loginHandler; + public InstanceButton instanceButton; + private void Start() + { + StartCoroutine(TestWait()); + } + + IEnumerator TestWait() { instance = this; @@ -30,7 +39,12 @@ private void Start() instancesObj = apiClass.CallStatic("loadAll"); configHandler.LoadConfig(); UpdateInstances(); - apiClass.SetStatic("model", OpenXRFeatureSystemInfo.GetHeadsetName()); + apiClass.SetStatic("model", OpenXRFeatureSystemInfo.GetHeadsetName()); + loginHandler.Login(); + + yield return new WaitForSeconds(30); + + instanceButton.LaunchCurrentInstance(); } private static void FillSupportedVersions(List supportedVersions, string[] supportedVersionsArray) diff --git a/Assets/Scripts/LoginHandler.cs b/Assets/Scripts/LoginHandler.cs index 13415bab..6246edd4 100644 --- a/Assets/Scripts/LoginHandler.cs +++ b/Assets/Scripts/LoginHandler.cs @@ -5,7 +5,7 @@ public class LoginHandler : MonoBehaviour { - bool isMainScreen; + public bool isMainScreen; private bool hasAttemptedLogin; AndroidJavaClass javaClass; AndroidJavaObject javaObject; @@ -42,7 +42,7 @@ async Task LoadingButtonText() hasAttemptedLogin = true; } - private async void CheckVerification() { + public async void CheckVerification() { if (Application.platform != RuntimePlatform.Android) return; while (isMainScreen == false) diff --git a/Assets/XR/Settings/OpenXR Editor Settings.asset b/Assets/XR/Settings/OpenXR Editor Settings.asset index 8e438346..0c4952cf 100644 --- a/Assets/XR/Settings/OpenXR Editor Settings.asset +++ b/Assets/XR/Settings/OpenXR Editor Settings.asset @@ -16,6 +16,7 @@ MonoBehaviour: Values: - featureSets: - com.meta.openxr.featureset.metaxr + - com.zappar.openxr.generic.featureset.loader - featureSets: - com.meta.openxr.featureset.metaxr m_vulkanAdditionalGraphicsQueue: 0 diff --git a/Assets/XR/Settings/OpenXR Package Settings.asset b/Assets/XR/Settings/OpenXR Package Settings.asset index 04a70a58..c0e4ab00 100644 --- a/Assets/XR/Settings/OpenXR Package Settings.asset +++ b/Assets/XR/Settings/OpenXR Package Settings.asset @@ -75,7 +75,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: feeef8d85de8db242bdda70cc7ff5acd, type: 3} m_Name: OculusTouchControllerProfile Android m_EditorClassIdentifier: - m_enabled: 1 + m_enabled: 0 nameUi: Oculus Touch Controller Profile version: 0.0.1 featureIdInternal: com.unity.openxr.feature.input.oculustouch @@ -239,7 +239,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0f6bfdbcb316ed242b30a8798c9eb853, type: 3} m_Name: KHRSimpleControllerProfile Android m_EditorClassIdentifier: - m_enabled: 0 + m_enabled: 1 nameUi: Khronos Simple Controller Profile version: 0.0.1 featureIdInternal: com.unity.openxr.feature.input.khrsimpleprofile @@ -496,7 +496,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 056125dd64c0ed540b40a4af74f7b495, type: 3} m_Name: RuntimeDebuggerOpenXRFeature Android m_EditorClassIdentifier: - m_enabled: 0 + m_enabled: 1 nameUi: Runtime Debugger version: 1 featureIdInternal: com.unity.openxr.features.runtimedebugger @@ -601,6 +601,27 @@ MonoBehaviour: priority: 0 required: 0 ignoreValidationErrors: 0 +--- !u!114 &2058401042796469191 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 65e42b3b00c18334e89352c69c0add21, type: 3} + m_Name: GenericFeature Android + m_EditorClassIdentifier: + m_enabled: 1 + nameUi: Generic Android Loader + version: 1.0.0 + featureIdInternal: com.zappar.openxr.generic.loader + openxrExtensionStrings: + company: Zappar + priority: 0 + required: 0 + EnableTracker: 1 --- !u!114 &3038346838073451255 MonoBehaviour: m_ObjectHideFlags: 0 @@ -655,7 +676,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f647cc0545697264a9878224faada6d5, type: 3} m_Name: MetaQuestFeature Android m_EditorClassIdentifier: - m_enabled: 1 + m_enabled: 0 nameUi: Meta Quest Support version: 1.0.0 featureIdInternal: com.unity.openxr.feature.metaquest @@ -750,6 +771,7 @@ MonoBehaviour: - {fileID: 4716802777638266311} - {fileID: -2866839366817237755} - {fileID: -6114532943797586564} + - {fileID: 2058401042796469191} - {fileID: -3276684023927252855} - {fileID: -6584685598647757048} - {fileID: -4735109778570369378} diff --git a/Packages/GenericOpenXRLoader/Editor.meta b/Packages/GenericOpenXRLoader/Editor.meta new file mode 100644 index 00000000..7d9b41c7 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cd0b216dfa0cc794eaa9be2508a8a207 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Editor/AndroidManifestProcess.cs b/Packages/GenericOpenXRLoader/Editor/AndroidManifestProcess.cs new file mode 100644 index 00000000..923e75c7 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/AndroidManifestProcess.cs @@ -0,0 +1,30 @@ +using System; +using System.Xml; +using UnityEditor.Build.Reporting; +using UnityEditor.XR.OpenXR.Features; + +namespace Zappar.OpenXR.GenericAndroidLoader.Editor +{ + internal class ModifyAndroidManfest : OpenXRFeatureBuildHooks + { + public override int callbackOrder => 1; + + public override Type featureType => typeof(GenericFeature); + + protected override void OnPostGenerateGradleAndroidProjectExt(string path) + { + //throw new NotImplementedException(); + } + + protected override void OnPostprocessBuildExt(BuildReport report) + { + //throw new NotImplementedException(); + } + + protected override void OnPreprocessBuildExt(BuildReport report) + { + //throw new NotImplementedException(); + } + } + +} \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/Editor/AndroidManifestProcess.cs.meta b/Packages/GenericOpenXRLoader/Editor/AndroidManifestProcess.cs.meta new file mode 100644 index 00000000..c1a80a38 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/AndroidManifestProcess.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 23258aad9ee572f4daf4486622176081 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Editor/GenericFeatureEditor.cs b/Packages/GenericOpenXRLoader/Editor/GenericFeatureEditor.cs new file mode 100644 index 00000000..ba323601 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/GenericFeatureEditor.cs @@ -0,0 +1,24 @@ +using UnityEditor; + +namespace Zappar.OpenXR.GenericAndroidLoader.Editor +{ + [CustomEditor(typeof(GenericFeature))] + public class GenericFeatureEditor : UnityEditor.Editor + { + private SerializedProperty enableTracker; + + private void OnEnable() + { + enableTracker = serializedObject.FindProperty(nameof(GenericFeature.EnableTracker)); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.PropertyField(enableTracker); + + serializedObject.ApplyModifiedProperties(); + } + } +} \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/Editor/GenericFeatureEditor.cs.meta b/Packages/GenericOpenXRLoader/Editor/GenericFeatureEditor.cs.meta new file mode 100644 index 00000000..6390499e --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/GenericFeatureEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d90cc72c797201e43b7926602a4446b9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Editor/GenericFeatureSet.cs b/Packages/GenericOpenXRLoader/Editor/GenericFeatureSet.cs new file mode 100644 index 00000000..fbd7597c --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/GenericFeatureSet.cs @@ -0,0 +1,19 @@ +using UnityEditor; +using UnityEditor.XR.OpenXR.Features; + +namespace Zappar.OpenXR.GenericAndroidLoader.Editor +{ + [OpenXRFeatureSet( + FeatureIds = new[] + { + GenericFeature.featureId, + }, + UiName = "Generic OpenXR Support", + Description = "For targetting generic OpenXR compatible runtime on android", + FeatureSetId = "com.zappar.openxr.generic.featureset.loader", + SupportedBuildTargets = new BuildTargetGroup[] { BuildTargetGroup.Android } + )] + sealed class GenericFeatureSet + { + } +} \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/Editor/GenericFeatureSet.cs.meta b/Packages/GenericOpenXRLoader/Editor/GenericFeatureSet.cs.meta new file mode 100644 index 00000000..a2fe5bb5 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/GenericFeatureSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c41831c5be979b4bac07bd6b090053c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Editor/com.zappar.openxr.genericandroidloader.editor.asmdef b/Packages/GenericOpenXRLoader/Editor/com.zappar.openxr.genericandroidloader.editor.asmdef new file mode 100644 index 00000000..0863d8bc --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/com.zappar.openxr.genericandroidloader.editor.asmdef @@ -0,0 +1,20 @@ +{ + "name": "com.zappar.openxr.genericandroidloader.editor", + "rootNamespace": "", + "references": [ + "GUID:262f913ccd7417c46a908591bd2bb03e", + "GUID:4847341ff46394e83bb78fbd0652937e", + "GUID:96aa6ba065960476598f8f643e7252b6" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/Editor/com.zappar.openxr.genericandroidloader.editor.asmdef.meta b/Packages/GenericOpenXRLoader/Editor/com.zappar.openxr.genericandroidloader.editor.asmdef.meta new file mode 100644 index 00000000..5182f445 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Editor/com.zappar.openxr.genericandroidloader.editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 07f743df4e2c043459a8c5c1546f1fa9 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/LICENSE b/Packages/GenericOpenXRLoader/LICENSE new file mode 100644 index 00000000..8e1b33b5 --- /dev/null +++ b/Packages/GenericOpenXRLoader/LICENSE @@ -0,0 +1,7 @@ +Copyright 2022 NFYNT© + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/LICENSE.meta b/Packages/GenericOpenXRLoader/LICENSE.meta new file mode 100644 index 00000000..e1f03cde --- /dev/null +++ b/Packages/GenericOpenXRLoader/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f1b96422c500f04479755da7514f75ae +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime.meta b/Packages/GenericOpenXRLoader/Runtime.meta new file mode 100644 index 00000000..bc3aab2a --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 087b7271edfd155479e775042ddd897a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime/Android.meta b/Packages/GenericOpenXRLoader/Runtime/Android.meta new file mode 100644 index 00000000..b185f89b --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/Android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 43af8a26a5915fc4bb0544bedda66289 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime/Android/AndroidManifest.xml b/Packages/GenericOpenXRLoader/Runtime/Android/AndroidManifest.xml new file mode 100644 index 00000000..9981ce15 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/Android/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/Packages/GenericOpenXRLoader/Runtime/Android/AndroidManifest.xml.meta b/Packages/GenericOpenXRLoader/Runtime/Android/AndroidManifest.xml.meta new file mode 100644 index 00000000..40461cd4 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/Android/AndroidManifest.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: df1a155fe4bc9794ba7f2d4f1390d778 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime/Android/libc++_shared.so b/Packages/GenericOpenXRLoader/Runtime/Android/libc++_shared.so new file mode 100644 index 00000000..83acd19d Binary files /dev/null and b/Packages/GenericOpenXRLoader/Runtime/Android/libc++_shared.so differ diff --git a/Packages/GenericOpenXRLoader/Runtime/Android/libc++_shared.so.meta b/Packages/GenericOpenXRLoader/Runtime/Android/libc++_shared.so.meta new file mode 100644 index 00000000..b1974282 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/Android/libc++_shared.so.meta @@ -0,0 +1,71 @@ +fileFormatVersion: 2 +guid: b8339495ff07a704b8955ee78d11226d +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARM64 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime/Android/libopenxr_loader.so b/Packages/GenericOpenXRLoader/Runtime/Android/libopenxr_loader.so new file mode 100644 index 00000000..639bd4cf Binary files /dev/null and b/Packages/GenericOpenXRLoader/Runtime/Android/libopenxr_loader.so differ diff --git a/Packages/GenericOpenXRLoader/Runtime/Android/libopenxr_loader.so.meta b/Packages/GenericOpenXRLoader/Runtime/Android/libopenxr_loader.so.meta new file mode 100644 index 00000000..b98c3695 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/Android/libopenxr_loader.so.meta @@ -0,0 +1,71 @@ +fileFormatVersion: 2 +guid: 76529107da926c142804c3e7e975a8c5 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARM64 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime/GenericFeature.cs b/Packages/GenericOpenXRLoader/Runtime/GenericFeature.cs new file mode 100644 index 00000000..348e3d45 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/GenericFeature.cs @@ -0,0 +1,33 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine.XR.OpenXR; +using UnityEngine.XR.OpenXR.Features; + +#if UNITY_EDITOR +using UnityEditor; +using UnityEditor.XR.OpenXR.Features; +#endif + +namespace Zappar.OpenXR.GenericAndroidLoader +{ +#if UNITY_EDITOR + [OpenXRFeature(UiName ="Generic Android Loader", + Desc ="Generic openxr loader", + Version ="1.0.0", + Company = "Zappar", + DocumentationLink = "", + BuildTargetGroups = new[] { BuildTargetGroup.Android}, + CustomRuntimeLoaderBuildTargets = new [] {BuildTarget.Android}, + FeatureId = featureId + )] +#endif + public class GenericFeature : OpenXRFeature + { + /// + /// Well known feature id string for reference. + /// + public const string featureId = "com.zappar.openxr.generic.loader"; + + public bool EnableTracker = false; + } +} \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/Runtime/GenericFeature.cs.meta b/Packages/GenericOpenXRLoader/Runtime/GenericFeature.cs.meta new file mode 100644 index 00000000..b88028ea --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/GenericFeature.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 65e42b3b00c18334e89352c69c0add21 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime/GenericProfile.cs b/Packages/GenericOpenXRLoader/Runtime/GenericProfile.cs new file mode 100644 index 00000000..e62f6e1c --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/GenericProfile.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR.OpenXR.Features; + +#if UNITY_EDITOR +using UnityEditor; +using UnityEditor.XR.OpenXR.Features; +#endif + +namespace Zappar.OpenXR.GenericAndroidLoader +{ +//#if UNITY_EDITOR +// [OpenXRFeature(UiName = "Generic Controllers", +// BuildTargetGroups = new [] {BuildTargetGroup.Android}, +// Desc = "Generic controller input profile", +// Version = "1.0.0", +// DocumentationLink = "", +// Category = FeatureCategory.Interaction, +// FeatureId = featureId +// )] +//#endif +// public class ZapboxProfile : OpenXRInteractionFeature +// { +// public const string featureId = "com.zappar.openxr.generic.feature.input.controllers"; +// } +} \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/Runtime/GenericProfile.cs.meta b/Packages/GenericOpenXRLoader/Runtime/GenericProfile.cs.meta new file mode 100644 index 00000000..60bce74d --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/GenericProfile.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 85cab3f24b5f3a145919f7f247d22c65 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/Runtime/com.zappar.openxr.genericandroidloader.asmdef b/Packages/GenericOpenXRLoader/Runtime/com.zappar.openxr.genericandroidloader.asmdef new file mode 100644 index 00000000..ed2b4c2f --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/com.zappar.openxr.genericandroidloader.asmdef @@ -0,0 +1,16 @@ +{ + "name": "com.zappar.openxr.genericandroidloader", + "rootNamespace": "", + "references": [ + "GUID:4847341ff46394e83bb78fbd0652937e" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/GenericOpenXRLoader/Runtime/com.zappar.openxr.genericandroidloader.asmdef.meta b/Packages/GenericOpenXRLoader/Runtime/com.zappar.openxr.genericandroidloader.asmdef.meta new file mode 100644 index 00000000..0cf39ca0 --- /dev/null +++ b/Packages/GenericOpenXRLoader/Runtime/com.zappar.openxr.genericandroidloader.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 262f913ccd7417c46a908591bd2bb03e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/GenericOpenXRLoader/package.json b/Packages/GenericOpenXRLoader/package.json new file mode 100644 index 00000000..49bf927b --- /dev/null +++ b/Packages/GenericOpenXRLoader/package.json @@ -0,0 +1,24 @@ +{ + "name": "com.zappar.openxr.genericandroidloader", + "displayName": "Generic OpenXR Loader", + "version": "0.1.0-preview.1", + "unity": "2020.3", + "description": "Provide the generic OpenXR loader for android devices", + "keywords": [ + "vr", + "xr", + "openxr" + ], + "author": { + "name": "Nameless", + "email": "test@test.com" + }, + "dependencies": { + "com.unity.inputsystem": "1.2.0", + "com.unity.xr.management": "4.0.7", + "com.unity.xr.openxr": "1.2.8" + }, + "samples": [], + "type": "library", + "hideInEditor": false +} diff --git a/Packages/GenericOpenXRLoader/package.json.meta b/Packages/GenericOpenXRLoader/package.json.meta new file mode 100644 index 00000000..37b191bd --- /dev/null +++ b/Packages/GenericOpenXRLoader/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: df0ea90029c0c884687a525886043cd5 +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 6278413e..4657233e 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -232,6 +232,16 @@ "com.unity.xr.openxr": "1.10.0" } }, + "com.zappar.openxr.genericandroidloader": { + "version": "file:GenericOpenXRLoader", + "depth": 0, + "source": "embedded", + "dependencies": { + "com.unity.inputsystem": "1.2.0", + "com.unity.xr.management": "4.0.7", + "com.unity.xr.openxr": "1.2.8" + } + }, "org.nuget.system.runtime.compilerservices.unsafe": { "version": "6.0.0", "depth": 0, diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 9863b418..9618c1aa 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -265,7 +265,7 @@ PlayerSettings: AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} - AndroidKeystoreName: '{dedicated}: Downloads/qcxr.keystore' + AndroidKeystoreName: /run/media/cadindie/qcxr.keystore AndroidKeyaliasName: qcxr AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 0