title: C# error : An object reference is required for the non-static field, method, or property line 12
body: <pre><code>using UnityEngine;
  using System.Collections;
  
  public class CharacterMovement : MonoBehaviour {
      public float maxSpeed = 6.0f;
      public  bool FacingRight = true;
      public float moveDirection;
  
      // Use this for initialization
      void FixedUpdate () {
          Rigidbody.velocity=newVector2(moveDirection*maxSpeed,Rigidbody.velocity.y);
       /**the error is in this line this is a simple game where the player just move left and right
          where when the D +ve number  is clicked the player moves forward (right) **/
      }
  
      // Update is called once per frame
      void Update () {
          moveDirection = Input.GetAxis("Horizontal");
      }
  }
  </code></pre>