using System; namespace UnityEngine.XR.ARFoundation { /// /// Container for SystemState event arguments. Used by the . /// public struct ARSessionStateChangedEventArgs : IEquatable { /// /// The new session state. /// public ARSessionState state { get; private set; } /// /// Constructor for these event arguments. /// /// The new session state. public ARSessionStateChangedEventArgs(ARSessionState state) { this.state = state; } public override int GetHashCode() { return ((int)state).GetHashCode(); } public override bool Equals(object obj) { if (!(obj is ARSessionStateChangedEventArgs)) return false; return Equals((ARSessionStateChangedEventArgs)obj); } public override string ToString() { return state.ToString(); } public bool Equals(ARSessionStateChangedEventArgs other) { return state == other.state; } public static bool operator ==(ARSessionStateChangedEventArgs lhs, ARSessionStateChangedEventArgs rhs) { return lhs.Equals(rhs); } public static bool operator !=(ARSessionStateChangedEventArgs lhs, ARSessionStateChangedEventArgs rhs) { return !lhs.Equals(rhs); } } }