Class InputBindingComposite<TValue> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class InputBindingComposite<TValue>

    A binding composite arranges several bindings such that they form a "virtual control".

    Inheritance
    System.Object
    InputBindingComposite
    InputBindingComposite<TValue>
    AxisComposite
    ButtonWithOneModifier
    ButtonWithTwoModifiers
    Vector2Composite
    Inherited Members
    InputBindingComposite.EvaluateMagnitude(InputBindingCompositeContext)
    Namespace: UnityEngine.InputSystem
    Syntax
    public abstract class InputBindingComposite<TValue> : InputBindingComposite where TValue : struct
    Type Parameters
    Name Description
    TValue

    Type of value computed by the composite.

    Remarks

    Composites are useful for arranging controls on a given device in a way that is not present on the device itself. A keyboard, for example, has no inherent way of controlling a 2D planar motion vector, for example. However, a WASD-style key arrangement is commonly used to achieve just that kind of control.

    Composites join several controls together such that they ultimately deliver a single value.

    Examples
    // A composite that uses two buttons to emulate a radial dial control.
    // Yields values in degrees.
    class ButtonDialComposite : InputBindingComposite<float>
    {
        ////TODO
    }

    Properties

    valueSizeInBytes

    Declaration
    public override int valueSizeInBytes { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    InputBindingComposite.valueSizeInBytes

    valueType

    Declaration
    public override Type valueType { get; }
    Property Value
    Type Description
    System.Type
    Overrides
    InputBindingComposite.valueType

    Methods

    ReadValue(ref InputBindingCompositeContext)

    Declaration
    public abstract TValue ReadValue(ref InputBindingCompositeContext context)
    Parameters
    Type Name Description
    InputBindingCompositeContext context
    Returns
    Type Description
    TValue

    ReadValue(ref InputBindingCompositeContext, Void*, Int32)

    Declaration
    public override void ReadValue(ref InputBindingCompositeContext context, void *buffer, int bufferSize)
    Parameters
    Type Name Description
    InputBindingCompositeContext context
    System.Void* buffer
    System.Int32 bufferSize
    Overrides
    InputBindingComposite.ReadValue(ref InputBindingCompositeContext, Void*, Int32)

    ReadValueAsObject(ref InputBindingCompositeContext)

    Declaration
    public override object ReadValueAsObject(ref InputBindingCompositeContext context)
    Parameters
    Type Name Description
    InputBindingCompositeContext context
    Returns
    Type Description
    System.Object
    Overrides
    InputBindingComposite.ReadValueAsObject(ref InputBindingCompositeContext)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023