You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tag components ( Empty structs ) do actually consume 1 byte per instance and are actually being allocated in each chunk.
Instead we could just ignore them, however this means that that some query like this...
Would throw an exception since the entity is tagged with it, but since its a non allocated tag component it can not be acessed. Debug.Assert could probably help here to avoid such errors.
The text was updated successfully, but these errors were encountered:
This is actually a bit harder to solve, since it would require a totally different handling of certain API calls or a lot of different conditions to make sure a user does not "Set" or "Get" a tag component.
Different solution
Instead a different solution was picked, each tag component still allocates an array ( which still is very very cheap ), but those arrays are not part of the chunk size calculation. This way Transform, Rotation, AITag and Transform, Rotation will fit the same amount of entities into each chunk, regardless of the tag. Since the tag is not being acessed in queries, the speed is also optimal.
Tag components ( Empty structs ) do actually consume 1 byte per instance and are actually being allocated in each chunk. Instead we could just ignore them, however this means that that some query like this...
Would throw an exception since the entity is tagged with it, but since its a non allocated tag component it can not be acessed. Debug.Assert could probably help here to avoid such errors.
flecs enforces Tags to have at least 1 field for example, int dummy; and it worked quite well for them. I see no issue with that either
Tag components ( Empty structs ) do actually consume 1 byte per instance and are actually being allocated in each chunk.
Instead we could just ignore them, however this means that that some query like this...
Would throw an exception since the entity is tagged with it, but since its a non allocated tag component it can not be acessed.
Debug.Assert
could probably help here to avoid such errors.The text was updated successfully, but these errors were encountered: