Game.Prefabs.ThemeRequirementData
Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs
Type: struct
Base: System.ValueType (implements Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter)
Summary:
ThemeRequirementData is an empty/tag ECS component used to mark entities (typically prefab instances) that participate in or require theme-related processing. The struct is laid out with StructLayout(LayoutKind.Sequential, Size = 1) to guarantee a non-zero size for the empty struct (common pattern for tag components in Unity ECS), and it implements IComponentData so it can be attached to entities and used in queries, and IQueryTypeParameter for use with some ECS query APIs.
Fields
- None — this is a tag/marker component with no instance fields.
The StructLayout(Size = 1) attribute forces the struct to occupy one byte so it can be used safely as a component in native arrays and entity component storage.
Properties
- None — no properties are defined on this struct.
Constructors
- Implicit default constructor (value-type)
As a struct, ThemeRequirementData has the implicit parameterless constructor that initializes the value to its default representation. No explicit constructors are defined.
Methods
- None — no methods are defined on this struct.
Usage Example
// Add the tag component to an entity
entityManager.AddComponent<ThemeRequirementData>(someEntity);
// Remove the tag component from an entity
entityManager.RemoveComponent<ThemeRequirementData>(someEntity);
// Query for entities that have the ThemeRequirementData tag
Entities.WithAll<ThemeRequirementData>().ForEach((Entity e, in SomeOtherComponent comp) =>
{
// handle theme requirement logic for e
}).Schedule();