Skip to content

Game.Prefabs.UIProductionLinkData

Assembly:
Assembly-CSharp (default Unity user assembly; may be different if the project uses custom assemblies)

Namespace: Game.Prefabs

Type:
struct

Base:
System.ValueType

Summary:
UIProductionLinkData is an empty marker/tag component for Unity's Entities (ECS). It implements IComponentData so it can be attached to entities and IQueryTypeParameter to be used in query parameterization. The StructLayout attribute forces a sequential layout with a Size of 1 byte — ensuring the struct is non-zero-sized for interop/ECS stability while carrying no payload data. This type is typically used to mark or identify prefabs/entities that participate in UI production linking behavior in the mod/game code.


Fields

  • (none)
    This type contains no fields; it is a pure marker/tag component. The StructLayout(Size = 1) attribute gives it a non-zero size even though it has no managed fields.

Properties

  • (none)
    No properties are defined. The type is a simple value-type tag.

Constructors

  • public UIProductionLinkData()
    As a value type, it has the implicit default constructor. There is no custom constructor or initialization logic.

Methods

  • (none)
    No methods are defined on this struct. It exists solely to be attached to entities or used as a query type parameter.

Usage Example

// Add the marker component to an entity (EntityManager API)
EntityManager.AddComponentData(entity, new UIProductionLinkData());

// Check whether an entity has the tag
if (EntityManager.HasComponent<UIProductionLinkData>(entity))
{
    // handle UI production link behavior
}

// Use as a filter in a query (Entities.ForEach style)
Entities.WithAll<UIProductionLinkData>().ForEach((Entity e, in SomeOtherData other) =>
{
    // Process only entities marked with UIProductionLinkData
}).Schedule();

Additional notes: - Because this is a tag component (no payload), systems can test for its presence to enable UI production link logic on specific prefabs/entities. - The explicit non-zero Size in StructLayout avoids creating a true zero-sized struct; this can help prevent edge-case/native interop issues and ensures a predictable layout for any low-level usage.