diff --git a/ScriptCore/Core/UUID.cs b/ScriptCore/Core/UUID.cs index dbfe514..235fc10 100644 --- a/ScriptCore/Core/UUID.cs +++ b/ScriptCore/Core/UUID.cs @@ -1,5 +1,8 @@ namespace GlitchyEngine.Core; +/// +/// Represents a universally unique identifier (UUID). +/// public struct UUID { private ulong _uuid; @@ -15,6 +18,21 @@ public struct UUID public static bool operator !=(UUID left, UUID right) => left._uuid != right._uuid; + public override bool Equals(object obj) + { + if (obj is UUID other) + { + return this == other; + } + + return false; + } + + public override int GetHashCode() + { + return _uuid.GetHashCode(); + } + public override string ToString() { return _uuid.ToString();