Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnassignedReferenceException error in Roll a Ball game

Discussion in 'Community Learning & Teaching' started by nirdeshdwa, Feb 3, 2016.

  1. nirdeshdwa

    nirdeshdwa

    Joined:
    Feb 3, 2016
    Posts:
    3
    I have done exactly like in the tutorial but there is an error and the console states it as follows:

    UnassignedReferenceException: The variable rb of PlayerController has not been assigned.
    You probably need to assign the rb variable of the PlayerController script in the inspector.
    UnityEngine.Rigidbody.AddForce (Vector3 force)
    PlayerController.FixedUpdate () (at Assets/Scripts/PlayerController.cs:15)
    Need help... got stuck on the first tutorial itself.