Game.Prefabs.SignatureBuildingData
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: struct
Base: System.ValueType, IComponentData, IQueryTypeParameter, IEmptySerializable
Summary:
SignatureBuildingData is an empty/marker ECS component used to tag entities (buildings) as a "signature" type within the game's entity/component systems. It is decorated with StructLayout(LayoutKind.Sequential, Size = 1) to force a 1-byte size (avoiding zero-sized type issues and ensuring predictable layout/serialization). The type implements IComponentData for use with Unity.Entities, IQueryTypeParameter to be usable in query APIs, and IEmptySerializable to participate in the Colossal.Serialization pipeline as an intentionally empty-serializable marker.
Fields
- This struct defines no instance fields. The StructLayout(Size = 1) attribute is used to ensure the type occupies exactly 1 byte, which aids in serialization and memory layout for empty marker components.
Properties
- This type exposes no properties. It is a marker component (no data carried) and relies on implemented interfaces for integration with ECS and the serialization system.
Constructors
- This struct uses the implicit parameterless constructor provided by C# for value types. No custom constructors are declared.
Methods
- No methods are declared on this type. Its behavior is that of a marker component; runtime systems and serializers interpret its presence/absence on entities.
Usage Example
// Add the marker component to an entity
var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
entityManager.AddComponentData(entity, new SignatureBuildingData());
// Query for entities that have this marker
Entities
.WithAll<SignatureBuildingData>()
.ForEach((Entity e) =>
{
// Do something with signature building entities
}).Schedule();
Additional notes:
- Because the component is empty, use WithAll