unity用代码设置Splash Screen闪屏
using UnityEditor;public class BuildUtil{public static void SetSplashScreen(){PlayerSetttings.SplashScreen.show = true;var logo = new PlayerSetttings.SplashScreenLogo();//设置闪屏时间logo.duration = 4f;//设置闪屏背景颜色PlayerSetttings.SplashScreen.backgroundColor = Color.white;//设置闪屏logologo.logo = AssetDatabase.LoadAssetAtPath<Sprite>("Assets/Texture/splash.png");PlayerSetttings.SplashScreen.logos = new PlayerSetttings.SplashScreenLogo[1] { logo };}}
赞 (0)
