Skip to content

Game.Tutorials.TutorialShown

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

Type: struct

Base: IComponentData, IQueryTypeParameter

Summary:
TutorialShown is a marker/tag component used to indicate that a specific tutorial has been shown. The struct has no instance fields and implements IComponentData so it can be used as an ECS component. The StructLayout attribute with Size = 1 ensures the type occupies at least one byte when used in native containers or interop, despite containing no managed fields. Use this component to mark entities (or players/concepts represented by entities) that have already seen a tutorial to prevent showing it again.


Fields

  • (none)
    No instance fields are defined — this is an empty/tag component.

Properties

  • (none)
    No properties are defined.

Constructors

  • public TutorialShown()
    An implicit parameterless constructor exists (struct default). Use new TutorialShown() when adding as component data, though the default value is equivalent.

Methods

  • (none)
    No methods are defined on this type.

Usage Example

// Add the tag to a newly created entity
var e = EntityManager.CreateEntity(typeof(Game.Tutorials.TutorialShown));

// Or add the tag to an existing entity
EntityManager.AddComponentData(existingEntity, new Game.Tutorials.TutorialShown());

// Query systems can filter by the tag
Entities
  .WithAll<Game.Tutorials.TutorialShown>()
  .ForEach((Entity e) =>
  {
      // This runs only for entities that have the TutorialShown tag
  }).Schedule();

// Remove the tag when you want to reset the state
EntityManager.RemoveComponent<Game.Tutorials.TutorialShown>(e);