- Home /
How do I bypass standalone config dialog?
I have a series of game demos/prototypes that I'm packaging into a kiosk. I don't have access to the development files/projects, just the published versions.
Some, but not all, of these demos were built in unity- many of them have the configuration prompt set to pop-up. I'm looking for a way to bypass the prompt. The prompts only have x-box controllers, so they won't have any way to do it manually.
I'm cool with writing a script to solve the problem, but I'm not sure where to start or how to approach it. Is there a headless way to interact with the configuration dialog?
Any advice or recommendations? I'm inclined to write a .net script to manage mutex-locking to prevent multiple launches (just in case), anybody know if I can eat unity's config gui using .net?
Answer by Bunny83 · Apr 28, 2015 at 06:24 PM
Well, since you don't have the source files it's getting difficult. Your options here are:
Using a tool like Autohotkey and create a script that selects the desired things on the setting dialog and press play.
Trying to patch the config asset inside your demo ^^
For the second solution i quickly build two versions of my project, one with the dialog enabled and one disabled. I used a hex-diff-tool to find the differences between certain files of those two builds. The setting for the dialog is stored in the "mainData" file inside the _Data folder. Since this file contains serialized data there is no exact offset as it might vary depending on the data. However you could try using a hex editor and searching manually for the "bit" ^^:
Before you try this you should create a backup (to be save from the whole build)
First search for the first string "Horizontal". In newer bulids it should appear around offset 1000h+. However if the build is older it might be earlier (right at the start sometimes). The position of the first Horizontal is our "upper limit"
Now go backwards. A few bytes upwards (about 100-250) you should find the company name / project title. If you found it, that's the "lower limit".
in between our two limits you might find (at least in newer builds) this sequence: FF FF FF FF FF FF FF FF (8x FF). If you can see something like that, that's the new lower limit. The bit will follow just a few bytes afterwards (sometimes it's even the next byte)
The bit that toggles the dialog is usually a "01 00 00 00" which is followed by some "01 01 01 ...". Just set that "01 00 00 00" to "00 00 00 00".
I have looked into several of my older build and it seems that the location and structure vary quite a bit. However the bit always seems to be between those limits. It also seems to be a 4 byte value (an int probably).
Good luck and happy hacking ^^.
ps: Horizontal is "48 6F 72 69 7A 6F 6E 74 61 6C" in hex
btw: If you want to specify the size of the window, or if it should run in fullscreen, check this page. There is the option "-show-screen-selector" but there's no option for the opposite ^^.
Answer by vtclayton · Mar 16, 2020 at 08:22 PM
To update Bunny's answer for Unity 2019.3 (at least):
The file with the control bit is now called "globalgamemanegers" and has no extension.
It seems awfully short-sighted that there's no command line argument on the stand-alone player to skip this screen.
Your answer
Follow this Question
Related Questions
SetResolution in full screen is a nightmare (Standalone Windows) 1 Answer
Is it possible to create a game build in unity’s runtime? (I’m making something like terror engine) 0 Answers
Windows Standalone Crashes in -batchmode , how do I read the strack from the log? 1 Answer
Player can't move in windows standalone 2 Answers
Mac VS Windows Builds 3 Answers