Как добавить ссылку на жесткий тело 2D
public Rigidbody2D rb;
Azad Kshitij
public Rigidbody2D rb;
GameObject myGameObject = new GameObject("Test Object"); // Make a new GO.
Rigidbody gameObjectsRigidBody = myGameObject.AddComponent<Rigidbody>(); // Add the rigidbody.
gameObjectsRigidBody.mass = 5; // Set the GO's mass to 5 via the Rigidbody.