Hey so, I'm been doing ESC for the past week and I'm reading as much documentation as I can
I have two Systems, ClientUserJoinSystem and CharacterSystem
The purpose is a Player with a Device joining the game and getting a character to spawn when a button is pressed
The first system takes a InputActionProperty and subscribes to its action when performed
Once it's performed, it does the following
Entity entity = CheckedStateRef.EntityManager.CreateEntity();
CheckedStateRef.EntityManager.AddComponentData(entity, new Characters.CharacterData());
CheckedStateRef.EntityManager.AddComponentData(entity, new UserPlayer { inputUser = newUser, playerIndex = playerIndex, controlScheme = controlScheme });
This works just fine, and the entity gets created with UserPlayer
Thing is, whenever I go and check CharacterSystem in the System tabs... (first pic related)
There's two entities in the CharacterSystem, which confuses me, Characters.CharacterData does not get instanced anywhere else but in the code snippet I posted (second pic related for references in visual studio)
So I'm extremely confused with the entity count, I don't know if it's supposed to say that or not, I don't know if I missed something in the manual
In CharacterSystem I did
foreach (var (cd, entity) in SystemAPI.Query<RefRO<CharacterData>>().WithEntityAccess())
{
Debug.Log($"{entity.Index} ver {entity.Version}");
}
And it only prints the same line over and over again, with the same entity index and version, so I just don't know
Maybe I should mention that the first is a SystemBase, and the character system is ISystem