Now that we've had a chance to look at the features of GameDriver, as well as some of the syntax and structure of the Hierarchy Path Query Language, let's look at a real example using the 2D Game Kit Community. The 2D Game Kit is available from the Unity Asset Store. Simply search for the 2D Game Kit anywhere in the store and then add the assets to your profile. From there, you can come to Unity and, in a new or existing project, import the 2D Game Kit from the package manager by searching for 'My Assets' and adding the package from there.

Once you have the 2D Game Kit installed, we can add the GameDriver package simply by searching for the relevant version for our project. In this case, we're working in Unity 2021.3, so I'll find the corresponding package from GameDriver and add the package here. Select or keep all the defaults and hit import. This will take a few moments to compile into the project.

Now that we've imported the GameDriver assemblies, we simply create a new empty game object at the root of the scene. We're calling it 'GameDriver,' but you can call it whatever you like, and then we're going to add the GDIO agent from there. We don't need to change any of the configurations here; we're just going to leave it as is.

Lastly, we're going to navigate to the GDIO folder, and under resources, we're going to show in Explorer, and add our License file. In this case, I just have it on my desktop, to that folder. Again, if you don't have a license already, visit, register there, and you can download your trial license.

Once I have everything set up and I hit play again, I'm going to confirm that the GameDriver agent is loaded and that it's running in the scene by looking for the agent overlay that will appear in the top left-hand corner of this window where the game is running, and it will show 'client connections equals zero.'

Now from here, I can navigate through the scene to see that everything's working properly, briefly before we get into developing or running any sort of tests. Here I can provide input like a user would, moving Chomper around the scene and exploring my options a bit. I understand what the inputs are. In this case, I'm working with my keyboard and mouse, so I know that I need to provide keyboard inputs and some mouse inputs as well. I've got a weapon; I can run around and perform some inputs.

The goal of this project is to find three keys on five different levels, navigate a bunch of puzzles, avoiding enemies, avoiding pitfalls, and then finding the three keys to open the door that we just saw light up here on my left. This is where the 'endgame' is. So the example that we're going to be going through today will take us through all of that in a very short amount of time, simply by shortcutting the things that need to be done in order to test that those features are working. Let's stop gameplay here.

Comments are closed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}