# Unity: RigidBody2D, Trying to Set rb;

So for Unity I've been trying to to do the code line public RigidBody2D rb; I've followed the gmetrix unity programming course and they do that just fine with the unity set up code and just this. This then allows them to put the object ubsprite that I and them called player inside the c# program for player. However for me the error CS0246 comes up. I've looked up similar situations and haven't found a fix for mine.

## Complete Code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour

{
public RigidBody2D rb;//RigidBody Slot

// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}
}


For them RigidBody2D lights up blue however for me it does not and I won't get to be able to add the sprite gameobject into the code slot for it.

Edit: Sorry noticed there are actually a couple of error messages. Hope this image helps from console.

Also to the comment I recieved about the video if I can upload it sadly this course is not publicically available its the simple course for Unity programming however it still provides a certificate and is associated with unity so it is a pay for course or if you are a student teachers can get course keys. It is the gmetrix course associated with unity and certiport for those who wanna know still.

Edit 2: An answer was provided for fixing the error CS0246, however the other 2 errors are still present.

It's spelled Rigidbody2D, not RigidBody2D. Capitalization matters in C#.