To PlayMode test a door animation, follow these steps:
- Create a new 3D Unity project and delete the default folder, called Scenes.
- In the Package Manager window, ensure you have the latest version of the Test Framework package installed.
- Import the Unity package provided (doorScene.unitypackage).
- Add the doorScene and menuScene scenes to the project build (the sequence doesn't matter).
- Ensure that the scene that's currently open is menuScene.
- Display the Test Runner window by going to Window | General | Test Runner.
- Ensure that the PlayMode button is selected in the Test Runner window.
- Now, we have to restart the Unity Editor (just close the application and then reopen it with your project).
- In the Test Runner window, click the Create PlayMode Test Assembly Folder button. You'll now see a folder called Tests in the Project window...