Game.Prefabs.BiomePrefabData
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: struct
Base: System.ValueType, Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter
Summary:
BiomePrefabData is an empty/tag component/marker struct used by the ECS to identify entities that represent biome prefabs. It is decorated with [StructLayout(LayoutKind.Sequential, Size = 1)] so the type has a defined size despite having no fields (useful for native/low-level interop and to ensure a non-zero size in memory). Implementing IQueryTypeParameter allows the type to be used in query descriptions and other ECS query-related APIs.
Fields
None
This struct declares no instance fields. The StructLayout attribute with Size = 1 ensures the struct occupies at least 1 byte.
Properties
None
There are no properties defined on this type.
Constructors
implicit default constructor
No explicit constructors are defined. The type uses the default parameterless constructor provided for value types.
Methods
None
No methods are defined on this struct. It acts purely as a marker/tag and for use in queries.
Usage Example
// Add the tag to an entity
var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
var archetype = entityManager.CreateArchetype(
typeof(Transform),
typeof(Game.Prefabs.BiomePrefabData) // tag this entity as a biome prefab
);
var entity = entityManager.CreateEntity(archetype);
// Query for biome-prefab entities with Entities.ForEach or EntityQuery
Entities
.WithAll<Game.Prefabs.BiomePrefabData>()
.ForEach((Entity e) =>
{
// operate on biome prefab entities
})
.Schedule();