Game.Prefabs.TutorialsConfigurationData
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: struct
Base: Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter
Summary:
A small ECS component (value type) used to store references to tutorial-related prefab/entities. Typically attached to a configuration or prefab entity to point at other entities that represent the tutorials intro list and map-tiles feature. As a struct implementing IComponentData it can be added to entities; implementing IQueryTypeParameter makes it usable with certain query APIs in the Unity Entities workflow.
Fields
-
public Unity.Entities.Entity m_TutorialsIntroList
Holds an Entity reference to the tutorials intro list prefab/asset. Commonly set to an entity representing a list or collection of tutorial steps/intros. Default value (when not set) is Entity.Null. -
public Unity.Entities.Entity m_MapTilesFeature
Holds an Entity reference to the map tiles feature used by tutorials (for example auxiliary visuals or interactive map tiles). Default value is Entity.Null.
Properties
- This type does not declare any properties. It only exposes the two public fields above.
Constructors
public TutorialsConfigurationData()
As a C# struct, it has an implicit parameterless constructor that initializes both Entity fields to their default value (Entity.Null). You can also create and initialize it using an object initializer.
Methods
- This type declares no methods.
Usage Example
// Create and assign references (introListEntity and mapTilesEntity are existing Entity instances)
var tutorialsConfig = new TutorialsConfigurationData {
m_TutorialsIntroList = introListEntity,
m_MapTilesFeature = mapTilesEntity
};
// Add to an entity (e.g., a configuration prefab entity) via an EntityManager
entityManager.AddComponentData(configEntity, tutorialsConfig);
// Querying entities that have this configuration component
Entities
.WithAll<TutorialsConfigurationData>()
.ForEach((in TutorialsConfigurationData config) =>
{
var introEntity = config.m_TutorialsIntroList;
var mapTilesEntity = config.m_MapTilesFeature;
// Use the referenced entities...
});