0

Unity Question

So I'm trying to make a 2d game with Unity. Unity doesn't seem to understand what "Rigidbody2D" is. I keep getting this error: "The type or namespace name "Rigidbody2d" could not be found" (I can't remember the exact error atm" The error occurs when I do this: private Rigidbody2D rb; There's no typo. Extensive googling shows it should be "Rigidbody2D" and nothing is working. Can anyone identify the issue? Edit: Yes, the error displays "Rigidbody2D" as "Rigidbody2d" Not sure if that has something to do with it, but I checked probably 50 times and I definitely typed "Rigidbody2D"

1st Nov 2019, 6:30 PM
Daniel Cooper
2 Answers
0
Do you have using UnityEngine; at the top of your script?
1st Nov 2019, 6:40 PM
Frenchtoast
Frenchtoast - avatar
0
Frenchtoast Yep. It adds it automatically. I'll send my code when I get home at 11 or 12. it's 1:48 now.
1st Nov 2019, 6:48 PM
Daniel Cooper