Skip to content

Game.Prefabs.UIEditorTutorialGroupData

Assembly:
Assembly-CSharp (typical for game/mod code; actual assembly may vary)

Namespace:
Game.Prefabs

Type:
struct

Base:
System.ValueType (implements Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter)

Summary:
UIEditorTutorialGroupData is an empty/tag component used with Unity's DOTS/ECS. It is defined as a sequential layout with an explicit Size = 1 to ensure the struct has a non-zero size (commonly done for tag components in ECS). The type implements IComponentData so it can be added to entities and used in EntityQueries; implementing IQueryTypeParameter allows it to participate in query-building APIs. Typical use is to mark or group entities involved with UI editor tutorial functionality (e.g., marking tutorial UI elements or grouping entities into a tutorial group).


Fields

  • This struct declares no instance fields.
    It is an intentionally empty/tag component. The StructLayout attribute sets the layout to Sequential with Size = 1 so the runtime allocates a single byte for the component.

Properties

  • This struct defines no properties.
    As a plain tag component it provides no data; presence/absence on an entity is the information.

Constructors

  • public UIEditorTutorialGroupData()
    The default parameterless constructor is implicit. No custom constructors are defined.

Methods

  • This struct defines no methods.
    It only serves as a marker/tag for ECS queries and archetypes.

Usage Example

using Unity.Entities;
using Game.Prefabs;

// Add the tag to an existing entity
EntityManager entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
Entity someEntity = /* obtain or create an entity */;
entityManager.AddComponent<UIEditorTutorialGroupData>(someEntity);

// Create an archetype that includes the tag component
EntityArchetype archetype = entityManager.CreateArchetype(typeof(UIEditorTutorialGroupData));
Entity taggedEntity = entityManager.CreateEntity(archetype);

// Query for entities that have this tag
EntityQuery query = entityManager.CreateEntityQuery(typeof(UIEditorTutorialGroupData));
using (var entities = query.ToEntityArray(Unity.Collections.Allocator.TempJob))
{
    // process tagged entities
}

Notes: - Because this is a tag component (no payload), use its presence to control systems or grouping logic rather than storing data. - The StructLayout Size = 1 ensures the component is non-zero sized which can be important for certain DOTS/ECS behaviors or interop.