To PlayMode and Unit Test a player health bar, follow these steps:
- Create a new Unity project, create a new empty scene, and delete the default folder Scenes.
- Import the Unity package provided (healthBarScene.unitypackage).
- Open the HealthBarScene scene.
- Add HealthBarScene to the project Build (menu: File | Build Settings ...).
- Display the Test Runner panel by choosing the following menu: Window | General | Test Runner.
- Enable PlayMode tests for all assemblies. Do this by displaying the drop-down menu in the top-right corner of the Test Runner panel, and selecting Enable playmode tests for all assemblies (click OK to any message concerned with restarting the editor).
- Now restart the Unity Editor (just close the application ...