#if XR_MGMT_320 using System.Collections.Generic; using UnityEditor; using UnityEditor.XR.Management.Metadata; using UnityEngine; namespace Unity.XR.MockHMD.Editor { internal class MockHMDMetadata : IXRPackage { private class MockHMDPackageMetadata : IXRPackageMetadata { public string packageName => "MockHMD XR Plugin"; public string packageId => "com.unity.xr.mock-hmd"; public string settingsType => "Unity.XR.MockHMD.MockHMDBuildSettings"; private static readonly List s_LoaderMetadata = new List() { new MockHMDLoaderMetadata() }; public List loaderMetadata => s_LoaderMetadata; } private class MockHMDLoaderMetadata : IXRLoaderMetadata { public string loaderName => "Mock HMD Loader"; public string loaderType => "Unity.XR.MockHMD.MockHMDLoader"; private static readonly List s_SupportedBuildTargets = new List() { BuildTargetGroup.Standalone, BuildTargetGroup.Android, }; public List supportedBuildTargets => s_SupportedBuildTargets; } private static IXRPackageMetadata s_Metadata = new MockHMDPackageMetadata(); public IXRPackageMetadata metadata => s_Metadata; public bool PopulateNewSettingsInstance(ScriptableObject obj) { var settings = obj as MockHMDBuildSettings; if (settings != null) { settings.renderMode = MockHMDBuildSettings.RenderMode.SinglePassInstanced; return true; } return false; } } } #endif