Hello Unity Community,
I been having a hellish time trying to move a simple square sprite across a solid color BG. I have followed and watched a ton of step-by-step Unity Tutorials in how to script a moving object across the screen and yet I’m getting errors that they don’t receive.
The error the I get is when I type in rigidbody2d.velocity. When I hover over the red underlined velocity in the code it tells me, “‘UnityEngine.Component’ does not contain a definition for ‘velocity’ and no extension method velocity accepting a first argument of type ‘UnityEngine.Component’ could be found (are you missing a using directive or an assembly reference?)”.
I have absolutely no idea what it is trying to tell me. Can anyone tell me how to solve this annoying issue? See the attachment to view my script for this problem.