mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
Update MetaIDAttribute.cs
This commit is contained in:
parent
94dc9daa67
commit
90d57539ae
@ -114,8 +114,7 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
public static string ParseIDFromTypeName(string name)
|
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;
|
int count = 0;
|
||||||
//skip name[0] char
|
//skip name[0] char
|
||||||
for (int i = 1, iMax = name.Length; i < iMax; i++)
|
for (int i = 1, iMax = name.Length; i < iMax; i++)
|
||||||
@ -136,7 +135,6 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
return new string(buffer, 0, count);
|
return new string(buffer, 0, count);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static string GenerateNewUniqueIDWithAttribute()
|
public static string GenerateNewUniqueIDWithAttribute()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user