Game.Prefabs.PlacedSignatureBuildingData
Assembly:
Game (assembly inferred; actual assembly may vary)
Namespace:
Game.Prefabs
Type:
struct
Base:
IComponentData, IQueryTypeParameter, IEmptySerializable
Summary:
PlacedSignatureBuildingData is an empty/tag ECS component used to mark entities that represent a "placed signature building" within the game's DOTS/ECS world. It is decorated with [StructLayout(LayoutKind.Sequential, Size = 1)] to ensure a non-zero size for serialization and interop. Implementing IComponentData makes it usable as a component in Unity's ECS; IQueryTypeParameter allows use in query-type parameters; IEmptySerializable indicates it participates in the game's custom serialization system (Colossal.Serialization) as an intentionally empty serializable type.
Fields
- This struct declares no instance fields; it is intentionally empty and functions as a tag/marker component.
Used attributes and interfaces ensure it can be serialized and stored in ECS despite having no data.
Properties
- This struct declares no properties. It is a plain tag type.
Constructors
public PlacedSignatureBuildingData()
(implicit default)
As an empty value type, it uses the default parameterless constructor. No initialization data is required.
Methods
- This struct declares no methods. Its purpose is purely as a marker component for queries and serialization.
Usage Example
// Add the tag to an existing entity
entityManager.AddComponentData(entity, new PlacedSignatureBuildingData());
// Create an archetype that includes the tag
var archetype = entityManager.CreateArchetype(
typeof(TransformAspect),
typeof(PlacedSignatureBuildingData) // tag component
);
// Query for all placed signature buildings in a system (Entities.ForEach style)
Entities.WithAll<PlacedSignatureBuildingData>().ForEach((Entity e, in TransformAspect t) =>
{
// handle placed signature building entity
}).Schedule();
Additional notes: - The [StructLayout(LayoutKind.Sequential, Size = 1)] attribute exists to guarantee a minimal size for the struct so serialization and native interop treat it predictably. - Use this component when you need to mark/filter entities that represent placed signature buildings without storing extra per-entity data.