Skip to content

Game.Prefabs.UIProductionLinksData

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: struct

Base: System.ValueType
Implements: Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter

Summary:
A marker/tag component (an empty struct) used by the game to mark entities related to UI production links. The struct is annotated with [StructLayout(LayoutKind.Sequential, Size = 1)] to ensure it has a non-zero size for native interop and ECS compatibility. It carries no data and exists solely for identification/filtering in ECS queries or for adding/removing a semantic tag on entities.


Fields

  • This component defines no instance fields.
    It is an empty/tag component. The explicit StructLayout with Size = 1 ensures the type is non-zero-sized for interoperability and to avoid certain runtime/serialization edge cases.

Properties

  • None. This type exposes no properties.

Constructors

  • public UIProductionLinksData()
    Implicit, parameterless default constructor provided by the C# compiler. No custom initialization is required or defined.

Methods

  • None. The struct defines no methods.

Usage Example

// Add the tag to an entity (EntityManager API)
entityManager.AddComponentData(entity, new UIProductionLinksData());

// Remove the tag
entityManager.RemoveComponent<UIProductionLinksData>(entity);

// Query for entities that have the tag (SystemBase / Entities.ForEach API)
Entities
    .WithAll<UIProductionLinksData>()
    .ForEach((Entity e) =>
    {
        // handle UI production link entity
    })
    .Run();