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

Quick Guide Question

Discussion in 'Input System' started by Max-K127, Dec 13, 2019.

  1. Max-K127

    Max-K127

    Joined:
    Mar 27, 2013
    Posts:
    7
    I've been following this guide, but am struggling to get any response from my keyboard or xbox controller
    https://docs.unity3d.com/Packages/com.unity.inputsystem@0.9/manual/Components.html

    Here's what I did:
    1. Create a 2d sprite component to the scene
    2. Add Component and select Player Input
    3. Click "create actions"
    4. Add a new script to the sprite component
    5. Edit the script to be exactly the same as MyPlayerScript, as shown in the guide
    6. Change the OnFire() and OnMove() functions to print something to the console.
    7. Run the scene, and try every keyboard and controller input I can think of.

    Has anyone had success in detecting events using Player Input? What did I miss?
     
  2. Max-K127

    Max-K127

    Joined:
    Mar 27, 2013
    Posts:
    7
    It seems to be working now after updating to newest version of unity.