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. Dismiss Notice

Help! Input not working.

Discussion in '2D' started by JAA2000, Aug 15, 2020.

  1. JAA2000

    JAA2000

    Joined:
    Aug 15, 2020
    Posts:
    4
    I've tried everything to make input work, I checked some other online forums and did the same setup and nothing has worked. Maybe it's my code? It's in the photo I attached. Thanks.
     

    Attached Files:

  2. BABIA_GameStudio

    BABIA_GameStudio

    Joined:
    Mar 31, 2020
    Posts:
    488
    Your Rigidbody2D variable never gets assigned to because you have put:
    Code (CSharp):
    1. void start()
    when it should be
    Code (CSharp):
    1. void Start()
    Capitalisation matters. I would also be assuming that there would be an error that you would be seeing, so it would always have been helpful if you could post any errors (I suspect it would have been a Null Reference exception), and also if any code you show can be in code tags, not a photo/screenshot.
     
  3. JAA2000

    JAA2000

    Joined:
    Aug 15, 2020
    Posts:
    4
    I tried capitalizing and it didn't work. Some errors im getting is: it says the .net core sdk cannot be located and that " some projects have trouble loading". It says the source is the c# extension.
     
  4. JAA2000

    JAA2000

    Joined:
    Aug 15, 2020
    Posts:
    4
    I also tried installing the .net core sdk but I'm still getting the message.
     
  5. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    Also, you have named your class Movementt - is this a spelling mistake? (Script and class names should match.)
     
  6. JAA2000

    JAA2000

    Joined:
    Aug 15, 2020
    Posts:
    4
    I tried and it still doesn't work. Besides the errors mentioned above, im getting no errors. Input still doesn't work.