docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Layout formats

    Add new layouts using the approach that fits how you author and register devices in your project.

    You can define layouts in three ways: as C# types, as JSON, or with the layout builder API at runtime. Use C# or JSON when your layout is fixed at build time. Use the layout builder when device structure is discovered dynamically, such as for HID devices.

    Topic Description
    Add a layout from C# Register a layout using C# classes derived from InputControl or InputDevice.
    Add a layout from JSON Register a layout from JSON to store or load definitions separately from your code.
    Add a layout using Layout Builder Build a layout at runtime with the layout builder API.

    Additional resources

    • Human Interface Device specification
    • Use an existing input device to create a layout
    • Create a custom device
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)