Update TypeMeta.cs

This commit is contained in:
DCFApixels 2025-03-19 13:47:22 +08:00
parent a0f9f696fd
commit b008643900

View File

@ -566,16 +566,17 @@ namespace DCFApixels.DragonECS
string id = atr.ID; string id = atr.ID;
if (type.IsGenericType && type.IsGenericTypeDefinition == false) if (type.IsGenericType && type.IsGenericTypeDefinition == false)
{ {
var metaIds = type.GetGenericArguments().Select(o => GetMetaID(o)); var metaIDs = type.GetGenericArguments().Select(o => GetMetaID(o));
if (metaIds.Any(o => string.IsNullOrEmpty(o))) if (metaIDs.Any(o => string.IsNullOrEmpty(o)))
{ {
id = string.Empty; id = string.Empty;
} }
else else
{ {
id = $"{id}<{string.Join(", ", metaIds)}>"; id = $"{id}<{string.Join(", ", metaIDs)}>";
} }
} }
id = string.Intern(id);
return id; return id;
} }
#else #else