docs.unity3d.com
    Show / Hide Table of Contents

    Keyboard navigation

    The ability use keyboard navigation in the IVI interface starts from the control map.

    The key events include:

    • IVIKnob_OK
    • IVIKnob_Back
    • IVIKnob_Left
    • IVIKnob_Right

    These actions are tied to the IVI Input Controller script on the Interaction GameObject.

    Start Control Provider

    The IVI Input Controller is designed to respond to input actions. To function correctly, a Start Control Provider must be selected for each screen.

    This ties the Input Control to the ScreenNavigationManager. For each screen, it navigates to a screen that has a Start Control Provider.

    When the screen is opened, the Start Control Provider gives the IVI Input Controller a control to select first. Different screens can implement the Start Control Provider differently. Most screens use the SimpleStartControlProvider to hold a direct link to each start control.

    For the IVI Media Player, the demo project uses a special implementation to select the highest control because it needs to build lists dynamically.

    Navigation controls

    The project uses the Unity Editor internal navigation to support navigation in the IVI keyboard:

    To move:

    To select a control:

    Back-key press scripts

    The back operation is not a default Unity Editor action. It is context dependent. To manage back-key presses, the project uses the following:

    BackListenerPressButton script

    You can add this script a toggle button and tie the press action to a Unity event on the IVI Input Controller script. When a user presses the back button, the system interprets it as a button press and returns to the previous screen.

    BackListenerInterpretAsGoLeft script

    When a user presses the back button, the script interprets it as moving left in the navigation. This is useful for going back from the song playlist to the track playlist in the Media Player interface.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on September 15, 2021