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

Need Help With My "Public Float" Not Working.

Discussion in 'Scripting' started by jshaughnessy, Jun 13, 2016.

  1. jshaughnessy

    jshaughnessy

    Joined:
    Jun 13, 2016
    Posts:
    4
    I started teaching myself how to make a 2D MMO Game today with a tutorial, and I hit a road block. My float values or anything in C# will not work. I just don't know what to do.

    As you can see from these images, all the words that should be the darker blue are not. The Move Speed won't even show up in the inspector. Anyone have a fix they could help me with?
     

    Attached Files:

  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,903
    Any errors in the console?
     
    jshaughnessy likes this.
  3. jimroberts

    jimroberts

    Joined:
    Sep 4, 2014
    Posts:
    560
    You have a coma between Input and GetAxisRaw instead of a period.
     
  4. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    And you've missed a multiplication sign in front of Time.deltaTime.
     
    boolfone likes this.
  5. jshaughnessy

    jshaughnessy

    Joined:
    Jun 13, 2016
    Posts:
    4
    Thx man
     
  6. jshaughnessy

    jshaughnessy

    Joined:
    Jun 13, 2016
    Posts:
    4
    Thx for the fix, my bad.
     
  7. jshaughnessy

    jshaughnessy

    Joined:
    Jun 13, 2016
    Posts:
    4
    I have no idea, if this helps, I didn't download anything other than just unity. Do I need a special C# application to get my floats to work?
     
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,026
    No. He's referring to the console inside the Unity editor. If there is a problem with your code it will display a message.

    http://docs.unity3d.com/Manual/Console.html
     
    shaderop likes this.