how to solve rigidbody2d destroied?

There’s only ONE process and it ALWAYS works, and it is ALWAYS the same process.

It’s three steps. Stop posting and wondering, start with the first step.

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null ← any other action taken before this step is WASTED TIME
  • Identify why it is null
  • Fix that