SDT0402: Missing InputMapper Attribute
| Property | Value |
|---|---|
| Rule ID | SDT0402 |
| Title | Missing InputMapper Attribute |
| Category | Input |
| Severity | Error |
Cause
An enum containing engine input binding definitions is missing the [InputMapper] system registration attribute.
Rule Description
Enums that declare action maps must be explicitly tagged with [InputMapper] so the custom compiler extension can locate them and generate matching code-behind mappings for the engine's control backend.
How to Fix Violations
Add the [InputMapper] attribute above the enum definition.
Violation:
public enum VehicleControls
{
[MappedAxis] Accelerate
}
Fix:
[InputMapper]
public enum VehicleControls
{
[MappedAxis] Accelerate
}
When to Suppress Warnings
Danger
Do not suppress this error. Without this attribute, the compiler ignores the enum entirely, and inputs will fail to trigger when pressed in-game.