Skip to content

Game.Prefabs.TelecomParameterData

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: struct

Base: System.ValueType
Implements: Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter

Summary:
TelecomParameterData is a small plain-old-data struct used with Unity.Entities (ECS) to carry a reference to a Telecom service prefab (an Entity). It is intended to be used as component-like parameter data or passed into queries/systems that need to know which telecom service prefab to work with. The struct is blittable and contains a single Entity field; by default that field is Entity.Null until assigned.


Fields

  • public Unity.Entities.Entity m_TelecomServicePrefab
    Holds an Entity handle that references the Telecom service prefab. This is not the prefab object itself but an ECS Entity representing the prefab within the current World/EntityManager. Check for Entity.Null before using; ensure the referenced entity is valid in the EntityManager being used.

Properties

  • This type does not declare any properties.
    Note: It implements IQueryTypeParameter to be usable as a query/system parameter pattern when needed.

Constructors

  • public TelecomParameterData()
    The implicit default constructor initializes m_TelecomServicePrefab to Entity.Null. Construct instances with an explicit value to set the prefab reference.

Methods

  • This type does not define any methods. It only contains a single public field and interfaces for ECS usage.

Usage Example

using Unity.Entities;
using Game.Prefabs;

// create a parameter struct with a prefab entity reference
var telecomParam = new TelecomParameterData
{
    m_TelecomServicePrefab = telecomPrefabEntity // telecomPrefabEntity is an Entity obtained earlier
};

// add it as a component to an entity (if appropriate)
entityManager.AddComponentData(targetEntity, telecomParam);

// or use in a system / query where this parameter is read
Entities
    .ForEach((ref TelecomParameterData param /*, other params */) =>
    {
        if (param.m_TelecomServicePrefab == Entity.Null)
            return;

        // use the prefab entity reference (e.g., instantiate, compare, or pass to factories)
    })
    .Run();