Vixen
02b45cc4
csharp
public interface ITagComponent

Marks a component that carries no data — only the fact that the entity has it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A tag occupies a bit in the archetype mask and not one byte of chunk memory, so a million entities tagged Static cost a megabyte less than they otherwise would and a query for them is a mask test rather than a scan.

Declared rather than inferred. An empty C# struct still measures one byte, so "has no fields" cannot be read from its size, and inferring it from reflection would mean a struct that gains a field silently changes storage class — the kind of change that compiles, runs, and loses data. Implementing this interface says it out loud, and a type that implements it and then grows a field fails at registration instead.

Used by (15)

  • FrozenVixen.Benchmarks.Ecs
  • BrokenTagVixen.Ecs.Tests
  • ComponentTypeVixen.Ecs
  • FrozenVixen.Ecs.Tests
  • HostileVixen.Engine.Tests
  • NetworkAudioTriggerVixen.Net.Audio
  • NetworkInstanceVixen.Net
  • NetworkTeleportVixen.Net.Engine
  • NpcVixen.Ecs.Tests
  • PhysicsTeleportVixen.Physics
  • PlayerVixen.Ecs.Tests
  • PlayerPawnVixen.Net.Engine
  • PredictedVixen.Net
  • WardedVixen.Engine.Tests
  • SpawnPointVixen.Editor.Assets.Tests