Class ComponentAttribute
- Namespace
- KeenEyes
- Assembly
- KeenEyes.Abstractions.dll
Marks a struct as an ECS component. Source generators will produce:
- Component ID and metadata
- Fluent builder methods (WithComponentName)
- Serialization code (if Serializable = true)
[AttributeUsage(AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[ExcludeFromCodeCoverage]
public sealed class ComponentAttribute : Attribute
- Inheritance
-
ComponentAttribute
- Inherited Members
Properties
Serializable
If true, generates binary serialization methods for this component.
public bool Serializable { get; set; }
Property Value
Version
The schema version of this component. Used for migration during deserialization. Default is 1. Increment when the component's schema changes.
public int Version { get; set; }