Skip to content

Game.Prefabs.UIInfoviewsConfigurationData

Assembly:
Assembly-CSharp

Namespace:
Game.Prefabs

Type:
struct (value type)

Base:
System.ValueType, IComponentData, IQueryTypeParameter

Summary:
UIInfoviewsConfigurationData is an empty "tag" or marker ECS component used by the game's DOTS systems to identify entities (typically prefab-derived entities) that represent or configure UI infoviews. The struct is declared with a StructLayout attribute (LayoutKind.Sequential, Size = 1) so the type has a guaranteed non-zero size; this is a common pattern for DOTS/interop marker types to avoid zero-sized-type issues and to ensure predictable memory layout. Being empty, it carries no runtime data — its presence/absence on an entity is the meaningful information.


Fields

  • This struct declares no instance fields.
    The StructLayout attribute sets a size of 1 byte to ensure the type is non-zero-sized for native/DOTS usage.

Properties

  • This struct exposes no properties.
    It implements IComponentData and IQueryTypeParameter to be usable as a component and in query type parameters.

Constructors

  • public UIInfoviewsConfigurationData()
    As a value type, it has the implicit default parameterless constructor that yields an empty marker instance. There is no custom constructor defined in source.

Methods

  • This struct defines no methods.

Usage Example

Add this marker component to entities to mark them as UI infoview configuration objects, or query for entities that have this marker.

1) Using an EntityManager (runtime/ECS code):

// Add the marker to an existing entity
entityManager.AddComponentData(entity, new UIInfoviewsConfigurationData());

// Check presence
bool has = entityManager.HasComponent<UIInfoviewsConfigurationData>(entity);

2) In a Baker (authoring -> entity conversion):

public class MyPrefabBaker : Baker<MyAuthoring>
{
    public override void Bake(MyAuthoring authoring)
    {
        var e = GetEntity(TransformUsageFlags.None);
        AddComponent(e, new UIInfoviewsConfigurationData());
    }
}

3) Querying in a System:

// SystemBase example to process all entities that are tagged with this marker
Entities
    .WithAll<UIInfoviewsConfigurationData>()
    .ForEach((Entity e, in SomeOtherComponent comp) =>
    {
        // Process UI infoview-configured entities
    }).Schedule();

Notes and tips: - Because the component carries no data, it is best used solely as a marker. If you later need data, create a separate component with fields. - The StructLayout(Size = 1) prevents the struct from being a zero-sized type (ZST) in native containers; this avoids certain interoperability or DOTS limitations with truly zero-sized structs.