Skip to content

Attributes and Annotations

These are RedEngine-specific annotations commonly used by game code. Fusion and Unity attributes keep their original behavior.

Gameplay and input

AnnotationTargetPurpose
[GameplayTag]readonly partial structGenerate a strongly typed tag domain
[GameplayAttribute("Name")]field/propertyRegister an ability-system attribute
[AttributeMin(value)]attribute field/propertyApply a static lower bound
[AttributeMax(value)]attribute field/propertyApply a static upper bound
[AttributeMaxBy("Other")]attribute field/propertyClamp using another attribute
[AttributeFormula(typeof(MyFormula))]attribute field/propertyDefine a derived formula and dependencies
[InputHandler]methodExpose a method to InputContext binding

Generated networking

AnnotationTargetPurpose
[NetworkModel]partial class/structGenerate a serializable network-state companion
[Replicated(capacity)]mutable collection fieldGenerate Fusion storage for ReplicatedCollection<T>
Inventory [Replicated]entity-fragment fieldGenerate fragment mutation and serialization code
Fusion [Networked]network model memberInclude a member in generated model state

The two ReplicatedAttribute types live in different namespaces. Use RedEngine.Foundation.ReplicatedAttribute for collections and RedEngine.Gameplay.Inventory.ReplicatedAttribute for fragment fields.

Configuration, console, and editor

AnnotationPurpose
[ConfigurationSection]Register a module configuration section
[ConsoleCommand]Discover a static or registered-instance command
[CommandSuggestion]Provide fixed or provider-generated argument suggestions
[ShowNetworked]Display network state through RedEngine inspector support
[InlineScriptableObject], [SubclassSelector]Improve polymorphic inspector authoring

See Generated code for the members created by generator-backed annotations.

RedEngine Framework documentation