1
\$\begingroup\$

How can I modify a Unity game (Windows) binary to skip the 5-second Unity logo splash screen?

I know how to mod game code using dnspy to modify Assembly-CSharp.dll. I'm able to find isShowingSplashScreen but that appears to be irrelevant. I'm at a loss whether I can find the splash screen code in any .dll or if one would have to edit the game .exe or some other file. Looking at the game .exe in HxD (hex editor), I see multiple occurrences of unity_SplashScreen but have no idea whether I can use this for anything.

Background

I'm modding a Unity game and I am not very good at it. I have to try a lot and start the game a lot. This means each time I test something, I lose five seconds because the game was made with the free Unity version.

As a player I made no commitment to the Unity ToS. I also have no intent to distribute a modded file that removes the splash screen. However, I want to remove it during development.

I am not asking how to remove the splash screen while building the game. I am not developing in Unity, I am modding a game made in Unity and I'm trying to streamline the process.

I did see Unity remove logo in splash screen, Alternatives to remove Unity splash screen after developing a game with the free version?, Can I legally remove the default Unity splash screen by removing it from the APK?. They revolve around the question of removing the splash screen with intent to distribute, which is not the topic here.

I had hesitations about asking this question, due to the answer being useful to developers willing to violate the ToS. However it seems on-topic and legal. I would also argue that the solution to my problem is probably going to be too much effort for active game dev projects to bother using it (having to repeat the steps for each new update) and that "bad apple" devs would rather use pirated versions of Unity Pro.

\$\endgroup\$
  • 7
    \$\begingroup\$ I understand that you do not intend to use this to distribute games with the splash screen removed. But any answer we post here in this public website could be used by less scrupulous developers to do just that. So, our users might justifiably have professional ethics reservations about answering this form of the question. Could we rephrase your question as "How can I speed up my mod & testing workflow?" - this opens the door to other solutions which might be free of this complication. \$\endgroup\$ – DMGregory Feb 2 '18 at 18:01
  • 3
    \$\begingroup\$ Also, have you tried reaching out to the original developer of the game? If you can work out a deal with them to share their source, you could test the bulk of your changes in-editor. Or you could work with them to develop a hot-loading feature for mod scripts so you don't need to use dnspy & reboot the game every time. Many developers are eager to cultivate a modding community as it can extend games' lifespans, broaden their audience, and generate more player interest, so this could be a mutually beneficial relationship. \$\endgroup\$ – DMGregory Feb 2 '18 at 18:11
  • 1
    \$\begingroup\$ You don't need to cite the reason you think the question is on-topic. It is on topic or we'd have closed it already. It's just distracting noise. \$\endgroup\$ – Josh Feb 2 '18 at 18:53
  • \$\begingroup\$ Is it possible that you could load your mod dynamically after it has launched? \$\endgroup\$ – Pikalek Feb 2 '18 at 21:28
  • \$\begingroup\$ @DMGregory I'm guessing you're suggesting dynamically loaded modding? I'm afraid I can't afford the time to become knowledgeable enough to implement such a thing. Also currently my problem is figuring out which functions are relevant so mostly I'm injecting debug messages manually. Contacting the developer is not an option. \$\endgroup\$ – Iwan Plays Feb 3 '18 at 1:15
6
\$\begingroup\$

A morally and legally sound way that can be openly discussed on a public forum like this one is to contact the original developer.

If you meet with such circumstances, chances are the game is one of these 2:

  1. The game is new/early access, reasonably successful (otherwise there's rarely a modding community) and the developer hasn't gotten around to switch to Unity Professional - which the free license requires them to do after making $100'000.

  2. The game is a completely free hobby project, in which case the developer might be open to the idea of people sponsoring his license, or giving source code access to some trusted modders.

In both of these cases, it's usually possible to reach the developer directly through any and all of their company's support addresses. When you do so, concentrate on describing your problem (load times) rather than proposing a solution (spend money), unless you're willing to provide a solution for them (pay in their stead).

This doesn't work if the game was made by a single developer who just disappeared (for whatever reason). Should that be the case, Iwan's answer seems to be the best option.

\$\endgroup\$
  • \$\begingroup\$ 1. Contacting the developer is not an option 2. There is no specific game in question. The example game in my answer used Personal in the first free public beta. The paid Steam version and at least the latest free (demo) version don't have a splash screen. I used the game as an example. \$\endgroup\$ – Iwan Plays Feb 5 '18 at 23:41
  • \$\begingroup\$ @IwanPlays Edited the answer to remove assumption that this is about a specific game. \$\endgroup\$ – Peter Feb 6 '18 at 9:40
0
\$\begingroup\$

It is possible to skip the Unity splash screen without manipulating any of the game files using a tool that accelerates the execution of a process.

Cheat Engine (be weary of bloatware during download and installation) provides this functionality and even automation through Lua scripting language.

I made a video guide: https://youtu.be/Oje1QEC-R9c

Instructions

  1. Install and start Cheat Engine
  2. Open Table/Show Cheat Table Lua Script
  3. Paste following code in it (replace game.exe with your game's process name file - might differ from .exe file name, see video)


appName="game.exe" -- name of the application process

function listenOnceStops(timer)
  if getProcessIDFromProcessName(appName) == nil then
    object_destroy(timer)
    startLoop(attachOnceStarts)
  end
end

function attachOnceStarts(timer)
  if getProcessIDFromProcessName(appName) ~= nil then
    object_destroy(timer)
    openProcess(appName)
    speedhack_setSpeed(20)
    sleep(1000)
    speedhack_setSpeed(1)
    startLoop(listenOnceStops)
  end
end

function startLoop(loop)
  f = createForm(false) --create an invisible window
  t = createTimer(f);
  timer_setInterval(t, 500)
  timer_onTimer(t,loop)
end

startLoop(attachOnceStarts)

Code also available here.

  1. Press Execute script.

This will skip the first 20 seconds in one second, which includes the five second Unity splash screen. One drawback is that the script might start while the Resolution Dialog (resolution picker/screen selector) window appears, if the exe is configured to show it.

This might also work on macOS, since there seems to be a version of Cheat Engine for that platform. Not tested. No clue about Linux.

A simpler solution would still be welcome.

\$\endgroup\$
-2
\$\begingroup\$

You can not do this unless you have access to the engine environment that they use and have to hope that they have the enterprise edition and have selected to remove it

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.