using System;
using UnityEngine.SubsystemsImplementation;
namespace UnityEngine.XR.ARSubsystems
{
///
/// Describes features of an .
///
///
/// Enumerate available subsystems with SubsystemManager.GetSubsystemDescriptors and instantiate one by calling
/// Create on one of the descriptors.
/// Subsystem implementors can register their subsystem with
/// .
///
public class XRObjectTrackingSubsystemDescriptor :
SubsystemDescriptorWithProvider
{
///
/// Describes the capabilities of an implementation.
///
public Capabilities capabilities { get; private set; }
///
/// Describes the capabilities of an implementation.
///
public struct Capabilities : IEquatable
{
///
/// Tests for equality.
///
/// The other to compare against.
/// `True` if every field in is equal to this , otherwise `false`.
public bool Equals(Capabilities other) => true;
///
/// Tests for equality.
///
/// The `object` to compare against.
/// `True` if is of type and
/// also returns `true`; otherwise `false`.
public override bool Equals(object obj) => (obj is Capabilities capabilities) && Equals(capabilities);
///
/// Generates a hash suitable for use with containers like `HashSet` and `Dictionary`.
///
/// A hash code generated from this object's fields.
public override int GetHashCode() => 0;
///
/// Tests for equality. Same as .
///
/// The left-hand side of the comparison.
/// The right-hand side of the comparison.
/// `True` if is equal to , otherwise `false`.
public static bool operator ==(Capabilities lhs, Capabilities rhs) => lhs.Equals(rhs);
///
/// Tests for inequality. Same as `!`.
///
/// The left-hand side of the comparison.
/// The right-hand side of the comparison.
/// `True` if is not equal to , otherwise `false`.
public static bool operator !=(Capabilities lhs, Capabilities rhs) => !lhs.Equals(rhs);
}
internal XRObjectTrackingSubsystemDescriptor(string id, Type providerType, Type subsystemTypeOverride, Capabilities capabilities)
{
this.id = id;
this.providerType = providerType;
this.subsystemTypeOverride = subsystemTypeOverride;
this.capabilities = capabilities;
}
}
}