Game.Prefabs.BrandChirpData
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: struct
Base: IComponentData, IQueryTypeParameter
Summary:
BrandChirpData is an empty/tag ECS component used to mark entities related to "brand chirp" behavior/prefabs. The type is declared with a fixed non-zero size via [StructLayout(LayoutKind.Sequential, Size = 1)] so it is a valid, non-zero-sized IComponentData (avoids pitfalls with zero-sized structs in some runtimes/tools). Implementing IQueryTypeParameter makes it usable in ECS query/type parameter contexts as a marker. This component carries no data — presence/absence is the information it conveys.
Fields
- This struct defines no fields. It is a zero-data/tag component; its layout attribute only enforces a 1-byte size at runtime.
Properties
- This struct defines no properties.
Constructors
public BrandChirpData()
The default parameterless constructor is provided implicitly (struct default). There is no custom constructor.
Methods
- This struct defines no methods. It is intended only as a marker/tag component.
Usage Example
// Add the tag to an existing entity via EntityManager
entityManager.AddComponentData(entity, new BrandChirpData());
// In a SystemBase: process all entities that have the BrandChirpData tag
Entities
.WithAll<BrandChirpData>()
.ForEach((Entity e, ref SomeOtherComponent comp) =>
{
// handle brand-chirp-related logic here
})
.Schedule();
// In conversion/baker code (DOTS conversion pattern) add the tag to the created entity
public class BrandChirpAuthoringBaker : Baker<BrandChirpAuthoring>
{
public override void Bake(BrandChirpAuthoring authoring)
{
var entity = GetEntity(TransformUsageFlags.None);
AddComponent(entity, new BrandChirpData());
}
}