XRPackage.cs 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. using UnityEngine;
  2. namespace UnityEditor.XR.Management.Metadata
  3. {
  4. /// <summary>
  5. /// Implement this interface to provide package level information and actions.
  6. ///
  7. /// XR Plug-in Management will reflect on all types in the project to find implementers
  8. /// of this interface. These instances are used to get information required to integrate
  9. /// your package with the XR Plug-in Management system.
  10. /// </summary>
  11. public interface IXRPackage
  12. {
  13. /// <summary>
  14. /// Returns an instance of <see cref="IXRPackageMetadata"/>. Information will be used
  15. /// to allow the XR Plug-in Management to provide settings and loaders through the settings UI.
  16. /// </summary>
  17. IXRPackageMetadata metadata { get; }
  18. /// <summary>
  19. /// Allows the package to configure new settings and/or port old settings to the instance passed
  20. /// in.
  21. ///
  22. /// </summary>
  23. /// <param name="obj">ScriptableObject instance representing an instance of the settings
  24. /// type provided by <see cref="IXRPackageMetadata.Settings"/>.</param>
  25. /// <returns>True if the operation succeeded, false if not. If implementation is empty, just return true.</returns>
  26. bool PopulateNewSettingsInstance(ScriptableObject obj);
  27. }
  28. }