docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MyGamepadState

    Example state struct for a gamepad with a deadzone on each stick.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Namespace: DocCodeSamples.Tests
    Assembly: Unity.InputSystem.DocCodeSamples.dll
    Syntax
    public struct MyGamepadState

    Fields

    leftStick

    Left stick value, with a stick deadzone processor applied.

    Declaration
    [InputControl(layout = "Stick", processors = "stickDeadzone(min=0.125,max=0.925)")]
    public Vector2 leftStick
    Field Value
    Type Description
    Vector2

    rightStick

    Right stick value, with a stick deadzone processor applied.

    Declaration
    [InputControl(layout = "Stick", processors = "stickDeadzone(min=0.125,max=0.925)")]
    public Vector2 rightStick
    Field Value
    Type Description
    Vector2
    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)