The next step in this project is to hack into the roll-a-ball game and extract some important information (e.g. camera display, score). The AI will use that information to learn to play in later stages.
In this blog, I go over the internal structure of Unity games.
The folder structure of Unity games
The build of Unity games follows a general pattern, as shown in Figure 1. The root directory (center top) contains the main executable of the game, which is referred by shortcuts that usually initiate the game’s start. The data folder in this root directory is even more important – it contains all the game’s resources.
In the data folder (center right) contains a few interesting files…
- level0 and level0.resS represent a scene. In this case, it is the entire Roll-a-ball game.
- sharedassets0.assets represents globally used assets (some are also stored in .resS files).
- Extracting and editing these assets can be done with tools like Unity Assets Bundle Extractor or Unity Studio.
- If there was a Resources folder, a resources.assets file that holds its data would exist in this folder.
- A Managed folder that contains all Unity DLL files (bottom right).
(cf. [https://github.com])
What is a DLL file?
Dynamic Link Library files, or DLL files for short, are files that contain instructions that other programs can make use of , even simultaniously. The idea of DLL files is that multiple programs can share pieces of functionality in a single file.
These files are similar to executable programs (.exe). Unlike them, however, a DLL file cannot be run directly. Instead, they are called and executed by already running code. While these files typically have the .DLL file extension, some may use .OCX, .CPL, or .DRV.
(cf. [https://www.lifewire.com])
Sources:
[https://github.com]
Unity-game-hacking: https://github.com/xcsh/Unity-game-hacking (21.10.2019)
[https://www.lifewire.com]
What is a DLL file?: https://www.lifewire.com/what-is-a-dll-file-2625852 (21.10.2019)