Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Question How do I access the inputs in the new input system via script?

Discussion in 'Input System' started by AleMarcati, Jan 16, 2022.

  1. AleMarcati

    AleMarcati

    Joined:
    Jan 4, 2022
    Posts:
    9
    I decided to change to the new input system and I mapped all the keys, the only issue is I don't know how to access the inputs via script.
    I added a player input component to the character, but how do I get the inputs in the script? What is the most simple way to do that?

    I'm coming from Unreal and in Unreal the inputs simply trigger events that can be easily accessed from blueprints, so I'm stunned at how complicated this seems in Unity.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    This may help https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/QuickStartGuide.html
     
    AleMarcati likes this.
  3. halivudestevez

    halivudestevez

    Joined:
    May 12, 2019
    Posts:
    13
    Most useless document ever.
     
    AndreIvankio likes this.
  4. rdjadu

    rdjadu

    Joined:
    May 9, 2022
    Posts:
    103
  5. NickLeeJ

    NickLeeJ

    Joined:
    Jul 14, 2022
    Posts:
    2