AltUnity Inspector‘s main goal is to allow games to be explored and inspected outside of the Unity Editor, on the platform the game was built for. This approach is very similar to the Appium Inspector or to the DOM Inspector of a web browser.
Why would you want to use it
It could help you with a few challenges you’ve possibly encountered when testing Unity Games:
- Debug the built game, for example, to check the values of the objects during runtime
- Get a property from the object. For this, you’ll need the component name and sometimes the assembly, which is time-consuming to search. AltUnity Inspector will make sure to give you the exact component name and assembly, ready to be added to your tests
- Test a game without access to the source code or access to Unity Editor
- Sign up for free to get how to download info and access key
- A game build that uses AltUnity Tester v.1.5.4
- ADB or IProxy depending on what platform your game is running
- An open mind since this is an alpha version and many things might not work according to the plan. So any feedback from you will be highly appreciated
Connect to a game
When you start AltUnity Inspector you will first encounter the connection pop-up. This will require you to set the IP and the port of the device your game is running on. If you used AltUnity Tester before then you have to do the same setup here.
For people who didn’t use AltUnity Tester before here is a short explanation: if you run the game on the same device and use the default port(13000) then you don’t have to change anything. If your game is running on a mobile device then you first need to forward the port( more information here). Then you can leave the IP to localhost and just set the port to the port the game is running. Another way without port forwarding is to add the device IP.
Components and features
We divided the inspector into 4 main areas:
- Screenshot Area
Here we can see a screenshot of what is currently displayed on the game. Above the screenshot we have several settings:
- Live update: if this button is pressed it will tell the inspector to continuously take screenshots and display them. If the live update is off, you might have to use refresh to reflect the current state of the game in the Inspector.
- Image quality: how good the screenshot looks.
- Highlight color: change the color that highlights objects in the scene to be easier to see them.
Below the screenshot, we have a slider that will let you set the time scale (the speed of the game). This will let you control how slow or fast the game movements will be. You might want to slow down in order to properly observe a very fast scene or to speed things up to reach a specific game state.
2. Hierarchy Area
This area displays all the objects that are in the current game scene. It’s very similar to what Unity Hierarchy looks like and does. You can search and select an object to get information about it. Once selected, the object will be highlighted in the screenshot area if it is visible on the screen.
3. Element Information Area
Here you’ll find information about the selected object. This is similar to the Inspector window from Unity. Object name, id, world coordinates, screen coordinates and all the components the object has are displayed here. If you click the Methods or Fields button from one of the components it will display all the methods or fields of that component.
4. Footer Area
This area contains the following:
- Refresh button: this button will update the screenshot and the object displayed on the hierarchy with what is displayed in the game
- Action dropdown: this affects what your mouse does when you click the screenshot. There are 4 types of actions:
- Click: If this action is selected then when you click the screenshot it will also simulate a click in the game at that position.
- Swipe: this action will let you simulate a swipe in the game by clicking somewhere on the screenshot, moving the mouse and then releasing it.
- Hold: this action will let you simulate a click that will remain pressed for the same amount of time as you hold the mouse pressed on the screenshot.
- Select: clicking somewhere on the screenshot will select the first object that is on that position.
- Scene dropdown: displays all the scenes built in the game. You can load a specific scene by selecting it.
- Camera dropdown: shows all the active cameras that are on the display. Selecting one camera will modify the screen coordinates of the objects in the Element Information Area because it will recalculate the coordinates from the selected camera.
- Disconnect button: pressing it will disconnect you from the game and the connection pop-up will appear.
This is just an Alpha version, thus a lot of the functionalities are not implemented yet. We would like to add keyboard and mouse simulation, also the possibility to set values for the object property and invoke methods. Another improvement would be to add new features that could make writing tests easier. Your contribution with feature ideas, bug reports or any other feedback will be much appreciated. You can do this by completing this short feedback form, which you can also access from the application.