Class InputControlLayoutAttribute | Input System | 1.0.2
docs.unity3d.com
    Show / Hide Table of Contents

    Class InputControlLayoutAttribute

    Attribute to control layout settings of a type used to generate an InputControlLayout.

    Inheritance
    Object
    Attribute
    InputControlLayoutAttribute
    Inherited Members
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, Boolean)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, Boolean)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, Boolean)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, Boolean)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, Boolean)
    Attribute.GetCustomAttributes(ParameterInfo, Boolean)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, Boolean)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, Boolean)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, Boolean)
    Attribute.GetCustomAttributes(Module, Type, Boolean)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, Boolean)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, Boolean)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, Boolean)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, Boolean)
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, Boolean)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, Boolean)
    Attribute.Equals(Object)
    Attribute.GetHashCode()
    Attribute.Match(Object)
    Attribute.IsDefaultAttribute()
    Attribute._Attribute.GetTypeInfoCount(UInt32)
    Attribute._Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
    Attribute._Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)
    Attribute._Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
    Attribute.TypeId
    Namespace: UnityEngine.InputSystem.Layouts
    Syntax
    [AttributeUsage(AttributeTargets.Class, Inherited = false)]
    public sealed class InputControlLayoutAttribute : Attribute, _Attribute

    Properties

    commonUsages

    Declaration
    public string[] commonUsages { get; set; }
    Property Value
    Type Description
    String[]

    description

    Declaration
    public string description { get; set; }
    Property Value
    Type Description
    String

    displayName

    Gives a name to display in the UI. By default, the name is the same as the class the attribute is applied to.

    Declaration
    public string displayName { get; set; }
    Property Value
    Type Description
    String

    hideInUI

    If true, don't include the layout when presenting picking options in the UI.

    Declaration
    public bool hideInUI { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This will keep device layouts out of the control picker and will keep control layouts out of action type dropdowns.

    isGenericTypeOfDevice

    If true, the layout describes a generic class of devices such as "gamepads" or "mice".

    Declaration
    public bool isGenericTypeOfDevice { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This property also determines how the layout is presented in the UI. All the device layouts that are marked as generic kinds of devices are displayed with their own entry at the root level of the control picker (UnityEngine.InputSystem.Editor.InputControlPicker), for example.

    stateFormat

    Declaration
    public string stateFormat { get; set; }
    Property Value
    Type Description
    String

    stateType

    Associates a state representation with an input device and drives the control layout generated for the device from its state rather than from the device class.

    Declaration
    public Type stateType { get; set; }
    Property Value
    Type Description
    Type
    Remarks

    This is only useful if you have a state struct dictating a specific state layout and you want the device layout to automatically take offsets from the fields annotated with InputControlAttribute.

    updateBeforeRender

    Whether the device should receive events in BeforeRender updates.

    Declaration
    public bool updateBeforeRender { get; set; }
    Property Value
    Type Description
    Boolean
    See Also
    updateBeforeRender

    variants

    Declaration
    public string variants { get; set; }
    Property Value
    Type Description
    String
    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