Rigidbody2D vs rigidbody2D

I just started to learn Unity to make a 2D game, but I have a obtacle that may seem very stupid. when I try to add a c sharp script to my character to make it able to control I write Rigidbody2D, right? I watched some videos from youtube. Thet use rigidbody2D.velocity, but when I write it to my script there is just Rigidbody2D, whith a capital R.

Like I said, I’m realy new at this, but I couldn’t find a solution.

If you use Unity 5, you can’t see “rigidbody2D”. It is deprecated in Unity 5+.
You should write GetComponent().velocity instead of rigidbody2D.velocity

If you use Unity 4.X.X, rigidbody with lowercase “r” is still available, so please write rigidbody2D.velocity even if you don’t see it in MonoDevelop’s hint.

For additional info: Unity - Scripting API: GameObject.rigidbody

It might be that you are trying to use update instead of fixed update. Physics calculations involving rigidbodies tend to be done there instead. See how the video is using ‘void FixedUpdate()?’

I think capitalization changes local to global or some such thing. However, I’m assuming the video just made a mistake. In your example, use rigidbody2d.component and you will be fine. I never capitalize Rigidbody when I am coding, but I am fairly new. There might be a certain reason for it.

Best way to see is to run it! Complete the code and run it. See what the compiler says.