docs.unity3d.com
    Show / Hide Table of Contents

    Enum InputSettings.UpdateMode

    How the input system should update.

    Namespace: UnityEngine.InputSystem
    Syntax
    public enum UpdateMode
    Remarks

    By default, the input system will run event processing as part of the player loop. In the default configuration, the processing will happens once before every every dynamic update (Update), i.e. ProcessEventsInDynamicUpdate is the default behavior.

    There are two types of updates not governed by UpdateMode. One is Editor which will always be enabled in the editor and govern input updates for EditorWindows in sync to update.

    The other update type is BeforeRender. This type of update is enabled and disabled automatically in response to whether devices are present requiring this type of update (updateBeforeRender). This update does not consume extra state.

    Fields

    Name Description Value
    ProcessEventsInDynamicUpdate

    Automatically run input updates right before every Update.

    In this mode, no processing happens specifically for fixed updates. Querying input state in FixedUpdate will result in errors being logged in the editor and in development builds. In release player builds, the value of the dynamic update state is returned.

    ProcessEventsInFixedUpdate

    Automatically input run updates right before every FixedUpdate.

    In this mode, no processing happens specifically for dynamic updates. Querying input state in Update will result in errors being logged in the editor and in development builds. In release player builds, the value of the fixed update state is returned.

    ProcessEventsManually

    Do not run updates automatically. In this mode, Update() must be called manually to update input.

    This mode is most useful for placing input updates in the frame explicitly at an exact location.

    Note that failing to call Update() may result in a lot of events accumulating or some input getting lost.

    In This Article
    • Fields
    Back to top
    Terms of use
    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