namespace AssetRipper.VersionUtilities; public partial struct CompactUnityVersion32 : IEquatable, IComparable, IComparable { /// /// Compare to another object /// /// Another object /// /// 1 if this is larger or the other is not a Unity version
/// -1 if this is smaller
/// 0 if equal ///
public int CompareTo(object? obj) { return obj is CompactUnityVersion32 version ? CompareTo(version) : 1; } /// /// Compare two Unity versions /// /// Another Unity version /// /// 1 if this is larger
/// -1 if this is smaller
/// 0 if equal ///
public int CompareTo(CompactUnityVersion32 other) { if (this > other) return 1; else if (this < other) return -1; else return 0; } /// /// Check equality with another object /// /// Another object /// True if they're equal; false otherwise public override bool Equals(object? obj) { return obj is CompactUnityVersion32 version && this == version; } /// /// Check equality with another Unity version /// /// Another Unity version /// True if they're equal; false otherwise public bool Equals(CompactUnityVersion32 other) => this == other; /// public override int GetHashCode() { return m_data.GetHashCode(); } }