UXRCoreMetadata.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //-----------------------------------------------------------------------
  2. //-----------------------------------------------------------------------
  3. #if XR_MGMT_GTE_320
  4. namespace Rokid.XR.Core.Editor
  5. {
  6. using System.Collections.Generic;
  7. using UnityEditor;
  8. using UnityEditor.XR.Management.Metadata;
  9. using UnityEngine;
  10. /// <summary>
  11. /// XR Metadata for XR Plugin.
  12. /// Required by XR Management package.
  13. /// </summary>
  14. public class UXRCorePackage : IXRPackage
  15. {
  16. /// <summary>
  17. /// Package metadata instance.
  18. /// </summary>
  19. public IXRPackageMetadata metadata => new PackageMetadata();
  20. /// <summary>
  21. /// Populates package settings instance.
  22. /// </summary>
  23. ///
  24. /// <param name="obj">
  25. /// Settings object.
  26. /// </param>
  27. /// <returns>Settings analysis result. Given that nothing is done, returns true.</returns>
  28. public bool PopulateNewSettingsInstance(ScriptableObject obj)
  29. {
  30. return true;
  31. }
  32. private class LoaderMetadata : IXRLoaderMetadata
  33. {
  34. public string loaderName => "Rokid XR Core";
  35. public string loaderType => typeof(Rokid.XR.Core.XRLoader).FullName;
  36. public List<BuildTargetGroup> supportedBuildTargets => new List<BuildTargetGroup>()
  37. {
  38. BuildTargetGroup.Android,
  39. };
  40. }
  41. private class PackageMetadata : IXRPackageMetadata
  42. {
  43. public string packageName => "Rokid XR Core";
  44. public string packageId => "com.rokid.xr.core";
  45. public string settingsType => typeof(Rokid.XR.Core.XRSettings).FullName;
  46. public List<IXRLoaderMetadata> loaderMetadata => new List<IXRLoaderMetadata>()
  47. {
  48. new LoaderMetadata()
  49. };
  50. }
  51. }
  52. }
  53. #endif // XR_MGMT_GTE_320