Skip to content

Game.Prefabs.UIWhatsNewPanelPrefabData

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: struct

Base: IComponentData, IQueryTypeParameter

Summary:
Component data used by the ECS to mark or identify an entity as the "What's New" UI panel prefab. Contains a single integer identifier (m_Id) that can be used to reference a specific prefab instance, UI resource id, or other identifier your mod/system uses to associate runtime data with this panel.


Fields

  • public System.Int32 m_Id
    Identifier for the "What's New" panel prefab. Set this to the ID your system uses to reference the prefab or UI entry (for example a prefab index, resource id, or an internal mapping key). The field is a simple value type and is safe to read/write inside jobs or systems that have access to this component.

Properties

  • None

Constructors

  • public UIWhatsNewPanelPrefabData()
    The default value-type (struct) constructor is provided by C#. You can initialize the component inline with an object initializer, for example: new UIWhatsNewPanelPrefabData { m_Id = 123 }.

Methods

  • None

Usage Example

// Create an entity with the component and set the ID
var entityManager = Unity.Entities.World.DefaultGameObjectInjectionWorld.EntityManager;
var entity = entityManager.CreateEntity(typeof(Game.Prefabs.UIWhatsNewPanelPrefabData));
entityManager.SetComponentData(entity, new Game.Prefabs.UIWhatsNewPanelPrefabData { m_Id = 123 });

// Or create and set in one call
var e2 = entityManager.CreateEntity();
entityManager.AddComponentData(e2, new Game.Prefabs.UIWhatsNewPanelPrefabData { m_Id = 456 });

// Read inside a System
public partial class WhatsNewSystem : SystemBase
{
    protected override void OnUpdate()
    {
        Entities
            .ForEach((ref Game.Prefabs.UIWhatsNewPanelPrefabData data) =>
            {
                int panelId = data.m_Id;
                // Use panelId to lookup UI data, spawn or update the panel, etc.
            }).Schedule();
    }
}

{{ Additional notes: - The type implements IComponentData making it compatible with Unity's ECS (DOTS) workflows. - IQueryTypeParameter allows the type to be used in query type parameter contexts; usage may vary depending on your project's ECS patterns. - The field name m_Id follows a common internal naming convention — treat it as the authoritative ID storage for this component. }}