Skip to content

Game.UI.UIEconomyConfigurationData

Assembly: Assembly-CSharp (game assembly)
Namespace: Game.UI

Type: struct

Base: System.ValueType; implements Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter

Summary:
UIEconomyConfigurationData is an empty "tag" component used by the game's ECS to mark entities relevant to UI economy configuration. The struct is explicitly given a non-zero size (1 byte) via StructLayout to avoid being treated as a zero-sized type by some runtimes and to ensure stable behavior when used as a component or query parameter.


Fields

  • (none)
    This struct declares no instance fields. It is used purely as a marker/tag component.

Properties

  • (none)
    No properties are defined.

Constructors

  • public UIEconomyConfigurationData() (implicit)
    The default parameterless constructor is used. Because the struct is empty, you normally create it with new UIEconomyConfigurationData() when adding it as a component.

Methods

  • (none)
    There are no methods defined on this type.

Notes

  • The attribute [StructLayout(LayoutKind.Sequential, Size = 1)] sets the struct size to 1 byte. This prevents issues with zero-sized types and can be important for compatibility with native interop or ECS internals.
  • Implements IComponentData so it can be attached to entities as a component and implements IQueryTypeParameter so it can be used directly in queries / query parameter lists where supported.

Usage Example

// Add the tag to an entity
entityManager.AddComponentData(entity, new UIEconomyConfigurationData());

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

// Query systems: find all entities marked for economy UI configuration
Entities
    .WithAll<UIEconomyConfigurationData>()
    .ForEach((Entity e) =>
    {
        // Handle entities with the economy UI configuration tag
    })
    .Run();