using System;
using System.Collections.Generic;
namespace UnityEngine.XR.ARFoundation
{
///
/// Event arguments for the event.
///
[Obsolete("AREnvironmentProbesChangedEvent has been deprecated in AR Foundation version 6.0. Use ARTrackablesChangedEventArgs instead.", false)]
public struct AREnvironmentProbesChangedEvent : IEquatable
{
///
/// The list of s added since the last event.
///
public List added { get; private set; }
///
/// The list of s udpated since the last event.
///
public List updated { get; private set; }
///
/// The list of s removed since the last event.
///
public List removed { get; private set; }
///
/// Constructs an .
///
/// The list of s added since the last event.
/// The list of s updated since the last event.
/// The list of s removed since the last event.
public AREnvironmentProbesChangedEvent(
List added,
List updated,
List removed)
{
this.added = added;
this.updated = updated;
this.removed = removed;
}
///
/// 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() => HashCodeUtil.Combine(
HashCodeUtil.ReferenceHash(added),
HashCodeUtil.ReferenceHash(updated),
HashCodeUtil.ReferenceHash(removed));
///
/// 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 AREnvironmentProbesChangedEvent other) && Equals(other);
///
/// Generates a string representation of this .
///
/// A string representation of this .
public override string ToString()
{
return string.Format("Added: {0}, Updated: {1}, Removed: {2}",
added == null ? 0 : added.Count,
updated == null ? 0 : updated.Count,
removed == null ? 0 : removed.Count);
}
///
/// Tests for equality.
///
/// The other to compare against.
/// `True` if every field in is equal to this , otherwise false.
public bool Equals(AREnvironmentProbesChangedEvent other)
{
return
ReferenceEquals(added, other.added) &&
ReferenceEquals(updated, other.updated) &&
ReferenceEquals(removed, other.removed);
}
///
/// 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 ==(AREnvironmentProbesChangedEvent lhs, AREnvironmentProbesChangedEvent 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 !=(AREnvironmentProbesChangedEvent lhs, AREnvironmentProbesChangedEvent rhs) => !lhs.Equals(rhs);
}
}