Skip to content

Game.Prefabs.DomesticatedData

Assembly:
Game (assembly name not provided)

Namespace: Game.Prefabs

Type:
struct

Base:
System.ValueType (implements Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter)

Summary:
Component data used by the ECS to describe "domesticated" prefab parameters. Contains a bounds value representing idle-time range and a two-component integer vector representing group member count (typically min/max). This struct is intended to be attached to entities as IComponentData and can be used as a query parameter via IQueryTypeParameter.


Fields

  • public Bounds1 m_IdleTime
    Represents the allowed idle time range for the domesticated prefab. Uses Colossal.Mathematics.Bounds1 to store the range. Default value is the Bounds1 default/zero value unless initialized.

  • public int2 m_GroupMemberCount
    Two-component integer vector (Unity.Mathematics.int2) used to store group member counts — commonly interpreted as [min, max] members in a group for this prefab.

Properties

  • This struct defines no properties.

Constructors

  • public DomesticatedData()
    Default (implicit) parameterless constructor provided by C# for structs. Initializes m_IdleTime and m_GroupMemberCount to their default values (Bounds1 default, int2(0,0)). You can initialize fields inline when creating an instance.

Methods

  • This struct defines no methods.

Usage Example

// Example: create an entity with the DomesticatedData component
var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
var archetype = entityManager.CreateArchetype(typeof(Game.Prefabs.DomesticatedData));
var entity = entityManager.CreateEntity(archetype);

// Initialize with explicit values (Bounds1 default used here — replace with real bounds if available)
entityManager.SetComponentData(entity, new Game.Prefabs.DomesticatedData
{
    m_IdleTime = default,                  // set to a valid Bounds1 instance as needed
    m_GroupMemberCount = new Unity.Mathematics.int2(1, 4) // min 1, max 4 members
});