From 9cf1b60a06a093695776b08edfe1de7fdae160de Mon Sep 17 00:00:00 2001 From: Soraphis Date: Sun, 23 Oct 2022 23:03:20 +0200 Subject: [PATCH] fix: corrected IEquatable implementation check (#362) --- Packages/Core/Editor/Generator/AtomGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/Core/Editor/Generator/AtomGenerator.cs b/Packages/Core/Editor/Generator/AtomGenerator.cs index faf99c70..b39f508b 100644 --- a/Packages/Core/Editor/Generator/AtomGenerator.cs +++ b/Packages/Core/Editor/Generator/AtomGenerator.cs @@ -31,7 +31,7 @@ namespace UnityAtoms.Editor { var type = Type.GetType($"{FullQualifiedName}"); if (type == null) throw new TypeLoadException($"Type could not be found ({FullQualifiedName})"); - var isValueTypeEquatable = type.GetInterfaces().Contains(typeof(IEquatable<>)); + var isValueTypeEquatable = typeof(IEquatable<>).MakeGenericType(type).IsAssignableFrom(type); var baseTypeAccordingNested = type.FullName.Replace('+', '.');