Search Unity

Ошибка при попытке движения

Discussion in '2D' started by nazartiten2, Jan 27, 2022.

  1. nazartiten2

    nazartiten2

    Joined:
    Jan 27, 2022
    Posts:
    1
    я сделал скрипт с названием Player и и добавил к персонажу но при попытке движения пишет MissingComponentException: There is no 'Rigidbody2D' attached the"1" game object, but a script is trying to access it и незнаю что делать upload_2022-1-27_21-25-31.png
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,459
    But it's tell you what's wrong!

    Your script is trying to access a Rigidbody2D component on the GameObject named "1" but there isn't such a component added.

    Any help beyond that would be me saying you need to go to Unity Learn and lookup Unity components and/or 2D physics starter tutorials. :)

    Side-Note: This forum is a predominantly English speaking forum so I would suggest translating any posts to English to save lots of other devs, who want to help, all having to do so. Thanks.