-
Couldn't load subscription status.
- Fork 42
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hello, when using ComponentIndex in the system, I found that during a loop iteration, it's unable to overwrite the original ComponentIndex value.
[Test]
public static void Test_IndexedComponent_CommandBuffer()
{
var store = new EntityStore();
var index = store.ComponentIndex<IndexedInt, int>();
store.CreateEntity(1);
var ecb = store.GetCommandBuffer();
ecb.ReuseBuffer = true;
ecb.AddComponent(1, new IndexedInt { value = 70 });
ecb.AddComponent(1, new IndexedInt { value = 71 }); // replace previous value
ecb.Playback();
AreEqual(1, index.Values.Count); // should be 1, in fact is 2
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working