Skip to content

Game.Prefabs.UIPollutionConfigurationData

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: struct

Base: IComponentData, IQueryTypeParameter

Summary:
UIPollutionConfigurationData is an empty/tag component used by the game's ECS to mark entities (typically UI-related prefabs) that are associated with pollution configuration UI. The struct is decorated with [StructLayout(LayoutKind.Sequential, Size = 1)] to give it a concrete size (1 byte) at the managed level. It contains no data fields and serves purely as a marker for queries and component lookups (e.g., to find UI prefab entities, or to enable systems to operate only on entities that represent pollution configuration UI).


Fields

  • This struct has no instance fields.
    The [StructLayout(LayoutKind.Sequential, Size = 1)] attribute forces the struct to occupy 1 byte; otherwise it is used as a zero-data marker/tag.

Properties

  • None. This is a pure marker component with no properties.

Constructors

  • public UIPollutionConfigurationData()
    The normal default (parameterless) struct constructor is used. No custom initialization is required or provided.

Methods

  • None. No methods are defined on this component type.

Usage Example

// Add the marker component to an entity
EntityManager entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
entityManager.AddComponentData(someEntity, new UIPollutionConfigurationData());

// Create an EntityQuery for entities with this tag
EntityQuery query = entityManager.CreateEntityQuery(typeof(UIPollutionConfigurationData));

// In a system, operate only on entities that have the marker:
Entities
  .WithAll<UIPollutionConfigurationData>()
  .ForEach((Entity entity) =>
  {
      // Handle pollution-configuration UI entity
  }).Schedule();

Notes for modders: - This component is intended as a simple tag; you do not read/write fields on it. - Because it implements IQueryTypeParameter, it can be used directly in query builders (WithAll<>, WithAny<>, CreateEntityQuery, etc.). - When converting UI prefabs to entities (conversion workflows), add this component to the prefab's entity to mark it as the pollution-configuration UI element.