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