4
\$\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\$
8
  • 8
    \$\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
    Commented Feb 2, 2018 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
    Commented Feb 2, 2018 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\$
    – user1430
    Commented Feb 2, 2018 at 18:53
  • \$\begingroup\$ Is it possible that you could load your mod dynamically after it has launched? \$\endgroup\$
    – Pikalek
    Commented Feb 2, 2018 at 21:28
  • 1
    \$\begingroup\$ @JoshPetrie I think the downvotes show a defense is not out of place. I reworded it. Hope it's less noisy. \$\endgroup\$
    – Iwan Plays
    Commented Feb 3, 2018 at 1:16

5 Answers 5

5
\$\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\$
2
  • \$\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
    Commented Feb 5, 2018 at 23:41
  • \$\begingroup\$ @IwanPlays Edited the answer to remove assumption that this is about a specific game. \$\endgroup\$
    – Peter
    Commented Feb 6, 2018 at 9:40
5
\$\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\$
0
1
\$\begingroup\$

try this: Create a runtime script(not an editor), and paste the following:

#if !UNITY_EDITOR
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Scripting;
 
[Preserve]
public class SkipUnityLogo
{
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
    private static void BeforeSplashScreen()
    {
#if UNITY_WEBGL
        Application.focusChanged += Application_focusChanged;
#else
        System.Threading.Tasks.Task.Run(AsyncSkip);
#endif
    }
 
#if UNITY_WEBGL
    private static void Application_focusChanged(bool obj)
    {
        Application.focusChanged -= Application_focusChanged;
        SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
    }
#else
    private static void AsyncSkip()
    {
        SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
    }
#endif
}
#endif
\$\endgroup\$
0
\$\begingroup\$

It is possible to disable the unity splash screen on build game files.

I used unity pro to determine what files change when you switch splash screen on and off and it's the globalgamemanager file if you manually edit a specific part in it using a hex editor you can disable the splash screen

I made a tutorial on how to do it here: https://youtu.be/xvh0AeZCX9E

This was tested on Unity 2020.3.38f1 lts

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Unfortunately, if the link to this YouTube video ever rots or is blocked from a reader's country, they won't be able to learn from this answer what part of the file to edit and how. Can you update the text of your answer to include this information? \$\endgroup\$
    – DMGregory
    Commented Sep 7, 2022 at 12:48
-3
\$\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\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .