It's a good idea to write as much of the logic for a game as isolated, non-MonoBehaviour classes that are easy to unit test in Edit Mode as possible. However, some of the logic in a game relates to things that happen when the game is running. Examples include physics, collisions, and timing-based events. We test these parts of our games in PlayMode.
In this recipe, we'll create one very simple PlayMode test to check that the physics affect a Rigidbody (based on an example from the Unity documentation):
![](https://static.packt-cdn.com/products/9781839217616/graphics/assets/ac0b62d1-d67f-44b7-9577-9a1dcc62ea45.png)
Figure 13.25 – Running a physics PlayMode test