Skip to content

Commit 7af1755

Browse files
authored
Deleting the original splash screen sprite
1 parent 3683aa1 commit 7af1755

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

SetSplashScreenBlack.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,23 @@
1313

1414
#if UNITY_EDITOR
1515
using UnityEditor;
16-
using UnityEngine;
1716
using UnityEditor.Build;
1817
using UnityEditor.Build.Reporting;
1918

20-
public sealed class SetSplashScreenBlack : IPreprocessBuildWithReport
19+
public class SplashScreenModifier : IPreprocessBuildWithReport
2120
{
2221
public int callbackOrder { get { return 0; } }
2322

2423
public void OnPreprocessBuild(BuildReport report)
24+
{
25+
RemoveAllLogos();
26+
SetSplashScreenBackground();
27+
}
28+
29+
private static void RemoveAllLogos() =>
30+
PlayerSettings.SplashScreen.logos = new PlayerSettings.SplashScreenLogo[0];
31+
32+
private static void SetSplashScreenBackground()
2533
{
2634
PlayerSettings.SplashScreen.unityLogoStyle = PlayerSettings.SplashScreen.UnityLogoStyle.LightOnDark;
2735
PlayerSettings.SplashScreen.backgroundColor = Color.black;

0 commit comments

Comments
 (0)