Game.Tutorials.TutorialPhaseShown
Assembly:
Assembly-CSharp (most game types live in the game's main assembly; confirm in your build if different)
Namespace:
Game.Tutorials
Type:
struct
Base:
IComponentData, IQueryTypeParameter
Summary:
A lightweight marker/tag component used by the tutorial system to indicate that a particular tutorial phase has been shown. The struct is decorated with [StructLayout(LayoutKind.Sequential, Size = 1)], making it have a non-zero size (1 byte) despite being otherwise empty — useful when you want the component to behave as a non-zero-sized tag in Unity.Entities.
Fields
- This struct defines no instance fields. It is used as a tag component / marker.
Properties
- This struct defines no properties.
Constructors
public TutorialPhaseShown()
The default parameterless constructor is the implicit struct constructor; no custom constructors are declared.
Methods
- This struct declares no methods. It only implements the marker interfaces IComponentData and IQueryTypeParameter.
Usage Example
// Add the tag to an entity (e.g., when a tutorial phase is shown)
entityManager.AddComponentData(someEntity, new Game.Tutorials.TutorialPhaseShown());
// Check for the tag
if (entityManager.HasComponent<Game.Tutorials.TutorialPhaseShown>(someEntity)) {
// phase already shown
}
// Remove the tag (if you want to reset)
entityManager.RemoveComponent<Game.Tutorials.TutorialPhaseShown>(someEntity);
// Using inside a SystemBase to run logic for entities that have the tag:
public partial class TutorialSystem : SystemBase
{
protected override void OnUpdate()
{
Entities
.WithAll<Game.Tutorials.TutorialPhaseShown>()
.ForEach((Entity entity) =>
{
// handle entities marked as "tutorial phase shown"
}).ScheduleParallel();
}
}
Notes: - As a marker component it is typically used to tag an entity (for example a central tutorial manager entity or per-phase entities) to record that a phase has been displayed. - The IQueryTypeParameter interface indicates it can be used in query parameter contexts in newer ECS APIs.