Game.Prefabs.LocalizationCount
Assembly:
Assembly-CSharp (typical for game/mod assemblies)
Namespace:
Game.Prefabs
Type:
struct
Base:
Unity.Entities.IBufferElementData
Summary:
Buffer element type used with Unity ECS dynamic buffers. Represents a single integer count related to localization for a prefab (for example, the number of localized strings or variants associated with an entity). This struct is a plain, blittable data container intended to be stored in a DynamicBuffer
Fields
public int m_Count
Holds the integer count value. Interpreted by game logic as the number of localization entries/variants associated with the containing entity or prefab. Stored directly in the buffer element and is blittable for efficient ECS usage.
Properties
- None.
This type exposes only a public field and implements IBufferElementData; no properties are defined.
Constructors
public LocalizationCount()
Implicit default constructor provided by the language for this value type. Initializes m_Count to 0 by default if not explicitly set.
Methods
- None.
This struct contains no methods; it is intended purely as a data container for use in DynamicBuffer.
Usage Example
// Add a buffer to an entity and append a count element
var buffer = entityManager.AddBuffer<LocalizationCount>(entity);
buffer.Add(new LocalizationCount { m_Count = 3 });
// Read or modify elements later
for (int i = 0; i < buffer.Length; i++)
{
var elem = buffer[i];
// use elem.m_Count (e.g., sum counts, update UI, etc.)
elem.m_Count += 1;
buffer[i] = elem;
}