Search Unity

Rigidbody 2d

Discussion in 'Scripting' started by L3ftt0d13, Jul 6, 2019.

  1. L3ftt0d13

    L3ftt0d13

    Joined:
    Feb 22, 2017
    Posts:
    1
    hi i dont used unity for some time and I have a question and I dont know where to ask, I had a problem with my script where it says not to identify rigidbody2d and I do not know how to solve http: //prntscr.com/ob8813 in visual studio says there are no errors, but in unity yes

    How do I recognize rigidbody2d?
    http://prntscr.com/ob88jf
     
    Last edited: Jul 6, 2019
  2. ZaffreSheep

    ZaffreSheep

    Joined:
    Aug 26, 2018
    Posts:
    32
    This might sound stupid, but I'm pretty sure you need a capital "d". So it should be
    private Rigidbody2D playerRB
    Same goes for when you try to get the component on line 15.