Vixen
dd8b0a81
csharp
public sealed class ComponentAttribute

Marks a type as an ECS component. The reflection generator assigns it a ComponentTypeId and registers it into the per-assembly type registry at module initialisation, so no type scanning happens at run time.

Read the guide page for this →

As a annotation

Valid on
Class, Struct

Remarks

⚠ With DataContractAttribute beside it, this is also what lets a scene place one. The engine's component generator declares every type carrying both to SceneComponentRegistry, which is what puts it in the inspector, in the Add Component menu, in a .vxscene and in a compiled one. The two attributes answer two questions — "the ECS may attach it" and "it can be described and turned into bytes" — and a component that answers only the first is a handle its own bridge writes, which is exactly the thing a scene must not carry.

Used by (89, showing 40)

  • BoxCollisionThirdPersonShooter
  • CharacterVisualsThirdPersonShooter
  • ScrapAiVillage
  • SpawnPointThirdPersonShooter
  • AiAgentVixen.Ai
  • AiFocusVixen.Ai.Nodes
  • AiPerceptionVixen.Ai.Perception
  • AiStimuliSourceVixen.Ai.Perception
  • AngularVelocityVixen.Physics
  • AnnotationTestsVixen.Core.Tests
  • AudioClipRefVixen.Audio
  • AudioEventRefVixen.Audio
  • AudioListenerComponentVixen.Audio
  • AudioReverbZoneRefVixen.Audio
  • AudioSourceVixen.Audio
  • AudioSpatialVixen.Audio
  • BlendShapeWeightsVixen.Rendering
  • BuoyancyBodyVixen.Water.Physics
  • BuoyancyStateVixen.Water.Physics
  • CameraVixen.Engine
  • CameraConfinerVixen.Engine
  • CameraDirectorVixen.Engine
  • CameraImpulseListenerVixen.Engine
  • CameraNoiseVixen.Engine
  • CameraOcclusionVixen.Engine
  • CameraShotVixen.Engine
  • CameraTargetsVixen.Engine
  • CharacterMovementVixen.Physics
  • CharacterStateVixen.Physics
  • ColliderVixen.Physics
  • ComposerAimVixen.Engine
  • ControlRotationVixen.Engine
  • CoverSpotVixen.Ai.Nodes.Tests
  • FoliageBlockerComponentVixen.Rendering.Terrain
  • FoliageVolumeComponentVixen.Rendering.Terrain
  • FollowBodyVixen.Engine
  • FramingBodyVixen.Engine
  • HardLockBodyVixen.Engine
  • HardLookAimVixen.Engine
  • LightVixen.Rendering