Game.BatchesUpdated
Assembly: Game (inferred from project path)
Namespace: Game.Common
Type: struct
Base: System.ValueType (implements Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter)
Summary: BatchesUpdated is an empty/tag component used to mark that rendering or processing "batches" have been updated for an entity or a world state. It implements IComponentData so it can be attached as a component in the Unity.Entities (ECS) world and IQueryTypeParameter so it can be used directly in queries or query-building helpers. The StructLayout attribute forces the struct to occupy 1 byte to avoid zero-sized-type semantics.
Fields
- (none)
This is a tag component: it intentionally contains no instance data.
Properties
- (none)
As an empty struct, it provides no properties. Its behavior is determined solely by its presence/absence when attached to entities or queried.
Constructors
- (implicit) parameterless constructor
The default parameterless constructor is provided implicitly by the C# compiler for this value type. No explicit constructors are defined.
Methods
- (none)
No methods are defined on this type.
Usage Example
// Add the tag to an entity
entityManager.AddComponent<BatchesUpdated>(someEntity);
// Remove the tag from an entity
entityManager.RemoveComponent<BatchesUpdated>(someEntity);
// Query for entities that have the tag
var query = entityManager.CreateEntityQuery(ComponentType.ReadOnly<BatchesUpdated>());
// or using the query builder API with the IQueryTypeParameter support:
Entities.WithAll<BatchesUpdated>().ForEach((Entity e) =>
{
// handle entities whose batches were updated
}).Schedule();
Notes: - The [StructLayout(LayoutKind.Sequential, Size = 1)] attribute ensures the struct is not treated as a zero-sized tag by lower-level systems and occupies a single byte in memory. - Use this component as a lightweight flag to indicate state changes (e.g., batch updates) without carrying additional payload data.