using System; namespace UnityEngine.XR.ARFoundation { /// /// Provides arguments for the event. /// public struct ARRaycastUpdatedEventArgs : IEquatable { /// /// The raycast that has been updated. /// public ARRaycast raycast { get; internal set; } /// /// Tests for equality. /// /// The event args to compare for equality. /// `True` if all properties are the same; `false` otherwise. public bool Equals(ARRaycastUpdatedEventArgs other) => ReferenceEquals(raycast, other.raycast); /// /// Tests for equality. /// /// The `object` to compare with this object. /// `True` if is an and /// is `true`, otherwise `false`. public override bool Equals(object obj) => obj is ARRaycastUpdatedEventArgs other && Equals(other); /// /// Computes a hash code from all properties suitable for use in a `Dictionary` or `HashSet`. /// /// A hashcode of this object. public override int GetHashCode() => raycast?.GetHashCode() ?? 0; /// /// Tests for equality. Same as . /// /// The left-hand side of the comparison. /// The right-hand side of the comparison. /// Same as public static bool operator ==(ARRaycastUpdatedEventArgs lhs, ARRaycastUpdatedEventArgs rhs) => lhs.Equals(rhs); /// /// Tests for inequality. Same as ! /// /// The left-hand side of the comparison. /// The right-hand side of the comparison. /// The negation of public static bool operator !=(ARRaycastUpdatedEventArgs lhs, ARRaycastUpdatedEventArgs rhs) => !lhs.Equals(rhs); } }