SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.1 KiB

4 years ago
  1. using System;
  2. namespace UnityEngine.XR.ARSubsystems
  3. {
  4. /// <summary>
  5. /// The descriptor of the <see cref="XRParticipantSubsystem"/> that shows which features are available on that XRSubsystem.
  6. /// </summary>
  7. /// <remarks>
  8. /// You use <see cref="Register{T}"/> register a subsystem with the global <c>SubsystemManager</c>.
  9. /// </remarks>
  10. public sealed class XRParticipantSubsystemDescriptor : SubsystemDescriptor<XRParticipantSubsystem>
  11. {
  12. /// <summary>
  13. /// The capabilities of a particular <see cref="XRParticipantSubsystem"/>. This is typically
  14. /// used to query a subsystem for capabilities that may vary by platform or implementation.
  15. /// </summary>
  16. [Flags]
  17. public enum Capabilities
  18. {
  19. /// <summary>
  20. /// The <see cref="XRParticipantSubsystem"/> implementation has no
  21. /// additional capabilities other than the basic, required functionality.
  22. /// </summary>
  23. None = 0,
  24. }
  25. /// <summary>
  26. /// The capabilities provided by this implementation.
  27. /// </summary>
  28. public Capabilities capabilities { get; private set; }
  29. /// <summary>
  30. /// Register a subsystem implementation.
  31. /// This should only be used by subsystem implementors.
  32. /// </summary>
  33. /// <param name="subsystemId">The name of the specific subsystem implementation.</param>
  34. /// <param name="capabilities">The <see cref="Capabilities"/> of the specific subsystem implementation.</param>
  35. public static void Register<T>(string subsystemId, Capabilities capabilities) where T : XRParticipantSubsystem
  36. {
  37. SubsystemRegistration.CreateDescriptor(new XRParticipantSubsystemDescriptor(subsystemId, typeof(T), capabilities));
  38. }
  39. XRParticipantSubsystemDescriptor(string subsystemId, Type subsystemType, Capabilities capabilities)
  40. {
  41. id = subsystemId;
  42. subsystemImplementationType = subsystemType;
  43. this.capabilities = capabilities;
  44. }
  45. }
  46. }