docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MyExampleInteraction

    Example custom interaction that performs when an axis moves quickly from one extreme to the other.

    Inheritance
    object
    MyExampleInteraction
    Implements
    IInputInteraction
    Namespace: DocCodeSamples.Tests
    Assembly: Unity.InputSystem.DocCodeSamples.dll
    Syntax
    public class MyExampleInteraction : IInputInteraction

    Fields

    duration

    Time window, in seconds, within which the axis must move from one extreme to the other.

    Declaration
    public float duration
    Field Value
    Type Description
    float

    Methods

    Process(ref InputInteractionContext)

    Processes the current state of the control(s) the interaction is bound to.

    Declaration
    public void Process(ref InputInteractionContext context)
    Parameters
    Type Name Description
    InputInteractionContext context

    Context giving access to the control state and phase transition methods.

    Reset()

    Resets the interaction's local state.

    Declaration
    public void Reset()

    Implements

    IInputInteraction
    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)