Unity 去Unity Log 去Splash图 非正式版也可以

Unity 去Unity Log 去Splash图 非正式版也可以

  • [将脚本丢到Asset目录下 打包出来即可](#将脚本丢到Asset目录下 打包出来即可)
  • 代码

将脚本丢到Asset目录下 打包出来即可

代码

csharp 复制代码
#if !UNITY_EDITOR
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Scripting;
 
[Preserve]
public class SkipUnityLogo
{
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
    private static void BeforeSplashScreen()
    {
#if UNITY_WEBGL
        Application.focusChanged += Application_focusChanged;
#else
        System.Threading.Tasks.Task.Run(AsyncSkip);
#endif
    }
 
#if UNITY_WEBGL
    private static void Application_focusChanged(bool obj)
    {
        Application.focusChanged -= Application_focusChanged;
        SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
    }
#else
    private static void AsyncSkip()
    {
        SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
    }
#endif
}
#endif
相关推荐
淡海水10 小时前
【节点】[Houndstooth节点]原理解析与实际应用
unity·游戏引擎·shadergraph·图形·houndstooth
微:xsooop1 天前
iOS上架被拒4.3(a) 10次到过审历程
flutter·unity·ios·uniapp
DoomGT1 天前
Physics Simulation - Hit Event的触发机制
ue5·游戏引擎·虚幻·虚幻引擎·unreal engine
jtymyxmz2 天前
《Unity Shader》14.1 卡通风格的渲染
unity·游戏引擎
天人合一peng2 天前
unity获得和修改button的text(TMP)
java·前端·unity
dzj20212 天前
Unity中使用LLMUnity遇到的问题(三)——如何配置和使用知识库
unity·llmunity·知识库大模型
Clank的游戏栈2 天前
Unity自动化美术资源校验工具(模型/材质规范检测)技术详解
unity·自动化·材质
Sator12 天前
Unity烘焙光打包后光照丢失问题
unity·光照贴图
Howrun7772 天前
虚幻引擎_核心框架
游戏引擎·虚幻
GLDbalala3 天前
Unity 实现一个简单的构建机
unity·游戏引擎