using System; namespace UnityEngine.XR.ARSubsystems { /// /// Describes the capabilities of an . /// [Obsolete("XRReferencePointSubsystemDescriptor has been deprecated. Use XRAnchorSubsystemDescriptor instead (UnityUpgradable) -> UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor", true)] public class XRReferencePointSubsystemDescriptor : SubsystemDescriptor { /// /// true if the subsystem supports attachments, i.e., the ability to attach a reference point to a trackable. /// public bool supportsTrackableAttachments { get; private set; } /// /// Constructor info used to register a descriptor. /// public struct Cinfo : IEquatable { /// /// The string identifier for this subsystem. /// public string id { get; set; } /// /// The concrete Type of the subsystem which will be instantiated if a subsystem is created from this descriptor. /// public Type subsystemImplementationType { get; set; } /// /// true if the subsystem supports attachments, i.e., the ability to attach a reference point to a trackable. /// public bool supportsTrackableAttachments { get; set; } public override int GetHashCode() { unchecked { var hash = (id == null) ? 0 : id.GetHashCode(); hash = hash * 486187739 + ((subsystemImplementationType == null) ? 0 : subsystemImplementationType.GetHashCode()); return hash; } } public override bool Equals(object obj) { if (!(obj is Cinfo)) return false; return Equals((Cinfo)obj); } public bool Equals(Cinfo other) { return String.Equals(id, other.id) && subsystemImplementationType == other.subsystemImplementationType; } public static bool operator ==(Cinfo lhs, Cinfo rhs) { return lhs.Equals(rhs); } public static bool operator !=(Cinfo lhs, Cinfo rhs) { return !lhs.Equals(rhs); } } /// /// Creates a new subsystem descriptor and registers it with the SubsystemManager. /// /// Constructor info describing the descriptor to create. public static void Create(Cinfo cinfo) { SubsystemRegistration.CreateDescriptor(new XRReferencePointSubsystemDescriptor(cinfo)); } XRReferencePointSubsystemDescriptor(Cinfo cinfo) { id = cinfo.id; subsystemImplementationType = cinfo.subsystemImplementationType; supportsTrackableAttachments = cinfo.supportsTrackableAttachments; } } }