From b0026ed4e12ffb5672feaf511f74e7aae3ec023c Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期五, 26 十月 2018 09:37:02 +0800
Subject: [PATCH] 4334 【前端】随包资源支持热更
---
Core/GameEngine/Login/Launch.cs | 45 +++++++++++++++++++++++----------------------
1 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index 7423ee0..b464d2e 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/Core/GameEngine/Login/Launch.cs
@@ -34,6 +34,27 @@
private void Awake()
{
+ ResourcesPath.Instance.Init();
+ SnxxzGame.Instance.gameObject.name = "__SnxxzGame__";
+
+ Application.backgroundLoadingPriority = ThreadPriority.BelowNormal;
+ Screen.sleepTimeout = SleepTimeout.NeverSleep;
+
+ ShaderUtility.InitGlobalParams();
+ SoundPlayer.CreateSoundPlayer();
+
+ SystemSetting.Instance.SetSoundVolume(SystemSetting.Instance.GetSoundVolume());
+ SystemSetting.Instance.SetSoundEffect(SystemSetting.Instance.GetSoundEffect());
+ SystemSetting.Instance.SetGameFps(SystemSetting.Instance.GetGameFps());
+
+ SDKUtility.Instance.Init();
+ GameObjectPoolManager.Instance.gameObject.name = "GameObjectPool";
+ GameObjectPoolManager.Instance.Initialize();
+ ExceptionCatcher.Init();
+ ExceptionCatcher.Catch();
+ DebugUtility.Instance.Init();
+ GlobalTimeEvent.Instance.Begin();
+
#if UNITY_ANDROID && !UNITY_EDITOR
var files = new List<FileInfo>();
FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, "builtin"), files);
@@ -80,32 +101,12 @@
}
#endif
- ResourcesPath.Instance.Init();
- SnxxzGame.Instance.gameObject.name = "__SnxxzGame__";
-
- Application.backgroundLoadingPriority = ThreadPriority.BelowNormal;
- Screen.sleepTimeout = SleepTimeout.NeverSleep;
-
- ShaderUtility.InitGlobalParams();
-
- SoundPlayer.CreateSoundPlayer();
- SoundPlayer.Instance.PlayLoginMusic();
- SystemSetting.Instance.SetSoundVolume(SystemSetting.Instance.GetSoundVolume());
- SystemSetting.Instance.SetSoundEffect(SystemSetting.Instance.GetSoundEffect());
- SystemSetting.Instance.SetGameFps(SystemSetting.Instance.GetGameFps());
-
- SDKUtility.Instance.Init();
- GameObjectPoolManager.Instance.gameObject.name = "GameObjectPool";
- GameObjectPoolManager.Instance.Initialize();
- ExceptionCatcher.Init();
- ExceptionCatcher.Catch();
- DebugUtility.Instance.Init();
- GlobalTimeEvent.Instance.Begin();
-
+ AssetBundleUtility.Instance.InitBuiltInAsset();
}
void Start()
{
+ SoundPlayer.Instance.PlayLoginMusic();
Config.Instance.PreLoadConfigs();
ServerListCenter.Instance.RequestJumpUrl();
--
Gitblit v1.8.0