modular-avatar/Runtime/Util/ObjectIdentityComparer.cs
bd_ f7b12d7f82
fix: ScaleAdjuster breaks scene view selection (#718)
... fixed by reimplementing ScaleAdjuster (again!)
2024-03-03 17:26:23 +09:00

19 lines
479 B
C#

using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace nadena.dev.modular_avatar.JacksonDunstan.NativeCollections
{
internal class ObjectIdentityComparer<T> : IEqualityComparer<T>
{
public bool Equals(T x, T y)
{
return (object)x == (object)y;
}
public int GetHashCode(T obj)
{
if (obj == null) return 0;
return RuntimeHelpers.GetHashCode(obj);
}
}
}