using System; namespace UnityEngine.Perception.GroundTruth { /// /// An entry for mapping a label to an integer id. /// [Serializable] public struct IdLabelEntry : ILabelEntry, IEquatable { string ILabelEntry.label => this.label; /// /// The label string to associate with the id. /// public string label; /// /// The id to associate with the label. /// public int id; /// public bool Equals(IdLabelEntry other) { return label == other.label && id == other.id; } /// public override bool Equals(object obj) { return obj is IdLabelEntry other && Equals(other); } /// public override int GetHashCode() { unchecked { return ((label != null ? label.GetHashCode() : 0) * 397) ^ id; } } } }