fix: corrected IEquatable implementation check

This commit is contained in:
Soraphis 2022-07-05 16:43:23 +02:00 committed by Oliver Biwer
parent a41a7f4abe
commit 4f597354e7

View File

@ -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('+', '.');