fix snapshot edge cases + fix debug component list
parent
2adecf771a
commit
d2b8e68b08
|
@ -60,7 +60,7 @@ public class Snapshot : IDisposable
|
|||
relationStorage.Clear();
|
||||
}
|
||||
|
||||
for (var i = 0; i < world.ComponentIndex.Count; i += 1)
|
||||
for (var i = 0; i < ComponentSnapshots.Count; i += 1)
|
||||
{
|
||||
var componentStorage = world.ComponentIndex[i];
|
||||
ComponentSnapshots[i].Restore(componentStorage);
|
||||
|
@ -106,10 +106,9 @@ public class Snapshot : IDisposable
|
|||
}
|
||||
|
||||
// restore entity tags
|
||||
world.EntityTags.Clear();
|
||||
foreach (var s in EntityTags)
|
||||
for (var i = 0; i < EntityTags.Count; i += 1)
|
||||
{
|
||||
world.EntityTags.Add(s);
|
||||
world.EntityTags[i] = EntityTags[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ public class ComponentTypeIdAssigner<T> : ComponentTypeIdAssigner
|
|||
|
||||
#if DEBUG
|
||||
World.ComponentTypeToId[typeof(T)] = new TypeId(Id);
|
||||
World.ComponentTypeIdToType.Add(typeof(T));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue