-
Notifications
You must be signed in to change notification settings - Fork 8
/
SplashScreenModifier.cs
39 lines (34 loc) · 1.25 KB
/
SplashScreenModifier.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Resharper disable all
// **************************************************************** //
//
// Copyright (c) RimuruDev. All rights reserved.
// Contact me:
// - Gmail: [email protected]
// - GitHub: https://github.com/RimuruDev
// - LinkedIn: https://www.linkedin.com/in/rimuru/
// - GitHub Organizations: https://github.com/Rimuru-Dev
// - GitHubRepo: https://github.com/RimuruDev/UnitySkipSplashScreen.git
//
// **************************************************************** //
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
public sealed class SplashScreenModifier : IPreprocessBuildWithReport
{
public int callbackOrder => 0;
public void OnPreprocessBuild(BuildReport report)
{
RemoveAllLogos();
SetSplashScreenBackground();
}
private static void RemoveAllLogos() =>
PlayerSettings.SplashScreen.logos = new PlayerSettings.SplashScreenLogo[0];
private static void SetSplashScreenBackground()
{
PlayerSettings.SplashScreen.unityLogoStyle = PlayerSettings.SplashScreen.UnityLogoStyle.LightOnDark;
PlayerSettings.SplashScreen.backgroundColor = Color.black;
}
}
#endif