Hello, I have the following code within the update function (c#):
if(Input.GetKey(KeyCode.UpArrow))
{
rigidbody2D.velocity.y = speed;
}
and I am getting this error:
Assets/player.cs(16,32): error CS0120: An object reference is required to access non-static member`UnityEngine.Component.rigidbody2D’
Can anyone assist? thanks