Update EcsDebug.cs

This commit is contained in:
Mikhail 2024-02-14 02:39:42 +08:00
parent 94a99e3121
commit d636d94549

View File

@ -98,7 +98,7 @@ namespace DCFApixels.DragonECS
public static Action<DebugService> OnServiceChanged = delegate { };
private IntDispenser _idDispenser = new IntDispenser(-1);
private IdDispenser _idDispenser = new IdDispenser(4, -1);
private Dictionary<string, int> _nameIdTable = new Dictionary<string, int>();
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -110,7 +110,7 @@ namespace DCFApixels.DragonECS
int id;
if (!_nameIdTable.TryGetValue(name, out id))
{
id = _idDispenser.GetFree();
id = _idDispenser.UseFree();
_nameIdTable.Add(name, id);
}
OnNewProfilerMark(id, name);