Game.Tutorials.InfoviewActivationData
Assembly: Assembly-CSharp
Namespace: Game.Tutorials
Type: struct
Base: IComponentData, IQueryTypeParameter
Summary:
A lightweight ECS component that stores a reference to an "infoview" Entity used by tutorial logic. Attach this component to an entity to indicate which infoview UI/entity should be activated or referenced by tutorial systems.
Fields
public Unity.Entities.Entity m_Infoview
Holds the Entity reference to the infoview (UI or related entity). Public so systems can read or write the reference directly. This is the only data carried by this component.
Properties
- (none)
This type exposes no properties—only a public field.
Constructors
public InfoviewActivationData(Entity infoview)
Initializes the component with the provided infoview Entity. Assigns m_Infoview = infoview.
Methods
- (none)
No methods are defined on this struct.
Usage Example
// Create/obtain the infoview entity somewhere in your setup:
Entity infoviewEntity = ...;
// Create a tutorial entity and attach the InfoviewActivationData component:
Entity tutorialEntity = entityManager.CreateEntity();
entityManager.AddComponentData(tutorialEntity, new InfoviewActivationData(infoviewEntity));
// Example usage inside a SystemBase to read and act on the stored infoview:
Entities
.ForEach((ref InfoviewActivationData activation) =>
{
Entity infoview = activation.m_Infoview;
// Use 'infoview' to enable, configure, or send messages to the infoview entity
})
.Schedule();