【Unity技巧】跳过Unity启动屏/Logo

Unity启动Logo让人非常不爽,因为展示unity logo非常拖沓, 延缓了打开游戏的时间

翻了一下Unity API文档,Unity居然真的有SplashScreen.Stop() 停止启动屏的API
在这里插入图片描述
只需要写个静态方法,使用[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
即在在显示启动画面之前调用这个静态方法,在静态方法中调用SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate)
来立即停止启动屏。

具体使用方法

在任意不是Editor的目录下新建代码脚本

#if !UNITY_EDITOR
using UnityEngine;
using UnityEngine.Rendering

猜你喜欢

转载自blog.csdn.net/qq_36303853/article/details/130599755