Files
Test/Library/PackageCache/com.unity.inputsystem@2436e68c60c4/Documentation~/override-layout-definitions.md
T
2026-11-01 23:39:55 +02:00

23 lines
764 B
Markdown

---
uid: input-system-override-layout-definitions
---
# Override layout definitions
You can non-destructively change aspects of an existing layout using layout overrides. You can call [`InputSystem.RegisterLayoutOverride`](xref:UnityEngine.InputSystem.InputSystem) to register a layout as an override of its [base layout](layout-inheritance.md). The system then adds any property present in the override to the base layout or to existing properties.
```CSharp
// Add an extra Control to the "Mouse" layout
const string json = @"
{
""name"" : ""Overrides"",
""extend"" : ""Mouse"",
""controls"" : [
{ ""name"" : ""extraControl"", ""layout"" : ""Button"" }
]
}
";
InputSystem.RegisterLayoutOverride(json);
```