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;
        //设置闪屏logo
        logo.logo = AssetDatabase.LoadAssetAtPath("Assets/Texture/splash.png");
        
        PlayerSetttings.SplashScreen.logos = new PlayerSetttings.SplashScreenLogo[1] { logo };
    }
}

 

你可能感兴趣的:(unity3D,Unity3D)