当前位置:   article > 正文

unity用代码设置Splash Screen闪屏_unity splashscreen代码调用

unity splashscreen代码调用
  1. using UnityEditor;
  2. public class BuildUtil
  3. {
  4. public static void SetSplashScreen()
  5. {
  6. PlayerSetttings.SplashScreen.show = true;
  7. var logo = new PlayerSetttings.SplashScreenLogo();
  8. //设置闪屏时间
  9. logo.duration = 4f;
  10. //设置闪屏背景颜色
  11. PlayerSetttings.SplashScreen.backgroundColor = Color.white;
  12. //设置闪屏logo
  13. logo.logo = AssetDatabase.LoadAssetAtPath<Sprite>("Assets/Texture/splash.png");
  14. PlayerSetttings.SplashScreen.logos = new PlayerSetttings.SplashScreenLogo[1] { logo };
  15. }
  16. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/91921
推荐阅读
相关标签
  

闽ICP备14008679号