Unity 2d error cs0246

The error is telling you what is wrong and on what line(9) and column (5). Here’s the docs. As you can see, it’s lowercase “b” so “Rigidbody2D”. C# is case sensitive. I’m actually surprised Intellisense doesn’t present you with it correctly.

Also, you’ve put a “FixedUpdate” method inside another method “Update” which is wrong. They are separate methods.

It’s also easier to post code as text and not images by using CodeTags .

Note: There is no such thing as Unity 2D. :wink:

Hope that helps.

1 Like