Update MetaIDAttribute.cs

This commit is contained in:
DCFApixels 2025-05-18 00:52:07 +08:00
parent 94dc9daa67
commit 90d57539ae

View File

@ -114,8 +114,7 @@ namespace DCFApixels.DragonECS
}
public static string ParseIDFromTypeName(string name)
{
using (StackAllocator.Alloc(name.Length, out char* buffer))
{
char* buffer = TempBuffer<MetaIDAttribute, char>.Get(name.Length);
int count = 0;
//skip name[0] char
for (int i = 1, iMax = name.Length; i < iMax; i++)
@ -136,7 +135,6 @@ namespace DCFApixels.DragonECS
}
return new string(buffer, 0, count);
}
}
public static string GenerateNewUniqueIDWithAttribute()
{