Game.Prefabs.SurfaceData
Assembly: Game
Namespace: Game.Prefabs
Type: struct
Base: System.ValueType
Summary:
SurfaceData is an empty/tag ECS component used by the game's code and serializer to mark or identify entities related to surface information. It is a zero-field struct decorated with StructLayout(LayoutKind.Sequential, Size = 1) so it has a non-zero size for interop/serialization purposes. It implements Unity.Entities.IComponentData (so it can be used as an ECS component), IQueryTypeParameter (usable in query type contexts), and Colossal.Serialization.Entities.IEmptySerializable (marker for the game's serialization system).
Fields
- (none)
This struct declares no instance fields. The StructLayout attribute with Size = 1 ensures it occupies one byte when laid out for interop/serialization.
Properties
- (none)
No properties are defined on this type.
Constructors
public SurfaceData()
Structs have an implicit parameterless constructor that will initialize the instance. There is no explicit constructor defined in source.
Methods
- (none)
No methods are defined; the type functions as a marker/tag and serialization marker via the implemented interfaces.
Usage Example
// Add SurfaceData as a tag component to an entity
entityManager.AddComponentData(entity, new SurfaceData());
// Query entities that have the SurfaceData tag
Entities.WithAll<SurfaceData>().ForEach((Entity e) =>
{
// handle surface-tagged entity
}).Run();