

The game engine will accept arguments other than +/- 1f, but this is not supported by the engine nor is it recommended. Note when using the AxisPress command, there is a positive and negative for each, which is defined by the second argument - '1f' for positive, and '-1f' for negative. Alternatively, we could hard code the number of frames for each input, such as AxisPress("Horizontal", 1f, 30). We're using the same "GetLastFPS" trick here that was discussed in the 2D Game Kit tutorial to somewhat normalize the duration of the inputs so they should be similar across machines of different performance levels. Vector3 newPos = position is:" + newPos.ToString()) Īssert.AreNotEqual(ellenPos, newPos, "Ellen didn't move!") Public void ellenPos = position is:" + ellenPos.ToString()) Īpi.AxisPress("Horizontal", 1f, fps * 2) Īpi.AxisPress("Horizontal", -1f, fps * 2) If neither of these is true, the test will fail. Otherwise, we can assume we're on Level1 and simply continue. We want to check whether we're at the Start scene here before attempting to click the StartButton. They are so similar, that we can essentially reuse the code from our 2D tests, with one small change. You will note that this project has a very similar loading screen to the 2D Game Kit found in our previous tutorials. The GameDriver agent added to the initial "Start" scene.īefore we get into the definition of tests, be sure to follow the Getting Started guide to set up your base test project if you are unfamiliar with how to create a basic GameDriver test library.īefore we get to specific tests, we need to start the game.

Once you have imported the project, simply download the latest version of GameDriver for your version of Unity, and add the agent to an otherwise empty object. It includes many of the assets and controls found in a typical game of this variety, such as puzzles, terrain, enemies, and levels, and is accompanied by an in-depth tutorial for modifying such a game or even implementing your own. The 3D Game Kit is a demo project from Unity, intended to teach the basics of implementing a 3rd-person 3D platformer-style game. To follow this tutorial, you will need to download the 3D Game Kit from the Unity Asset Store and import this asset into a new 3D project. This tutorial will demonstrate 3 tests, each with its own objective: This article will describe how to use similar concepts in a 3D application/game, where the "player" has 6-degrees of freedom of interaction. Once you have completed the 2D Game Kit Automation Tutorial and reviewed Testing the 2D Game Kit: the "correct" way, you may wonder how to apply these concepts to a 3D or VR project.
