diff --git a/Assets/ManagedResources/BGNC/loading_caohua.png b/Assets/ManagedResources/BGNC/loading_caohua.png new file mode 100644 index 0000000000..9c03005c57 Binary files /dev/null and b/Assets/ManagedResources/BGNC/loading_caohua.png differ diff --git a/Assets/ManagedResources/BGNC/loading_caohua.png.meta b/Assets/ManagedResources/BGNC/loading_caohua.png.meta new file mode 100644 index 0000000000..2370193f7f --- /dev/null +++ b/Assets/ManagedResources/BGNC/loading_caohua.png.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: debe0b026ec67894ea4854b4dad48e21 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 65 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: d8b82d28f899bb54dadeb644d19aac67 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: lz4/bgnc/loading_caohua + assetBundleVariant: unity3d diff --git a/Assets/ManagedResources/BGNC/login_caohua.png b/Assets/ManagedResources/BGNC/login_caohua.png new file mode 100644 index 0000000000..2ef797f0a0 Binary files /dev/null and b/Assets/ManagedResources/BGNC/login_caohua.png differ diff --git a/Assets/ManagedResources/BGNC/login_caohua.png.meta b/Assets/ManagedResources/BGNC/login_caohua.png.meta new file mode 100644 index 0000000000..cba22f887c --- /dev/null +++ b/Assets/ManagedResources/BGNC/login_caohua.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 1f89f317485449b4682324aa3ea3a6c2 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 65 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 6065f0ba99fca4f4eb7df038d3995089 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: lz4/bgnc/login_caohua + assetBundleVariant: unity3d diff --git a/Assets/ManagedResources/BGNC/logo_caohua.png b/Assets/ManagedResources/BGNC/logo_caohua.png new file mode 100644 index 0000000000..a609b9219e Binary files /dev/null and b/Assets/ManagedResources/BGNC/logo_caohua.png differ diff --git a/Assets/ManagedResources/BGNC/logo_caohua.png.meta b/Assets/ManagedResources/BGNC/logo_caohua.png.meta new file mode 100644 index 0000000000..8e91476f6e --- /dev/null +++ b/Assets/ManagedResources/BGNC/logo_caohua.png.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: 0752922022d678449b67d6c59a1bd6cf +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 65 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: f31bfb7b5b275f8499950f8d9e08726b + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: lz4/bgnc/logo_caohua + assetBundleVariant: unity3d diff --git a/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab b/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab index f87f1dc102..788678131c 100644 --- a/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab +++ b/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab @@ -244,7 +244,7 @@ Camera: field of view: 60 orthographic: 1 orthographic size: 3.6 - m_Depth: 99 + m_Depth: 100 m_CullingMask: serializedVersion: 2 m_Bits: 4294966783 diff --git a/Assets/ManagedResources/UpdatePanel/UpdatePanel.prefab b/Assets/ManagedResources/UpdatePanel/UpdatePanel.prefab index 3cbbf69ea0..78b448a2ea 100644 --- a/Assets/ManagedResources/UpdatePanel/UpdatePanel.prefab +++ b/Assets/ManagedResources/UpdatePanel/UpdatePanel.prefab @@ -896,7 +896,7 @@ Camera: field of view: 60 orthographic: 1 orthographic size: 3.6 - m_Depth: 100 + m_Depth: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294966527 diff --git a/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua b/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua index bf4a765cf9..5f1390db5c 100644 --- a/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua +++ b/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua @@ -17,7 +17,6 @@ ServerConfigManager.SettingConfig = { IS_PLAY_LOGIN_VIDEO = "IS_PLAY_LOGIN_VIDEO", -- 判断是否可以播放登录视频 PACKAGE_CONFIG = "PACKAGE_CONFIG", -- 包配置 IS_NO_TALKING = "IS_NO_TALKING", -- 禁言 - IS_LOAD_STREAMING_TEXTURE = "IS_LOAD_STREAMING_TEXTURE", -- 是否加载外部资源 } diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index 71348b4411..352892fa66 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -59,26 +59,19 @@ function this:InitComponent() this.versionText = Util.GetGameObject(this.loginPart, "version"):GetComponent("Text") this.versionText.text = Language[11136]..LoginRoot_Version - -- this.bg1 = Util.GetGameObject(this.gameObject, "bg11"):GetComponent("RawImage") - -- resMgr:SetStreamingTexture(this.bg1, "login_caohua.png") - -- 背景 this.bg = Util.GetGameObject(this.gameObject, "bg"):GetComponent("Image") this.bgStr = PackageManager.GetLoginPanelBg() - this.bg.color = Color.New(1, 1, 1, 0) - LoadStreamingTexture(this.spLoader, this.bgStr, function(sp) - this.bg.sprite = sp - this.bg.color = Color.New(1, 1, 1, 1) - end) + if this.bgStr then + this.bg.sprite = this.spLoader:LoadSprite(this.bgStr) + end -- logo this.logo = Util.GetGameObject(this.gameObject, "logo"):GetComponent("Image") this.logoStr = PackageManager.GetLoginPanelLogo() if this.logoStr then - LoadStreamingTexture(this.spLoader, this.logoStr, function(sp) - this.logo.gameObject:SetActive(true) - this.logo.sprite = sp - this.logo:SetNativeSize() - end) + this.logo.gameObject:SetActive(true) + this.logo.sprite = this.spLoader:LoadSprite(this.logoStr) + this.logo:SetNativeSize() else this.logo.gameObject:SetActive(false) end diff --git a/Assets/ManagedResources/~Lua/Modules/Message/LoadingPanel.lua b/Assets/ManagedResources/~Lua/Modules/Message/LoadingPanel.lua index f08f32b7a2..ef39a4875e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Message/LoadingPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Message/LoadingPanel.lua @@ -4,6 +4,8 @@ local this = LoadingPanel local tipsConfig = ConfigManager.GetConfig(ConfigName.Tips) --初始化组件(用于子类重写) function LoadingPanel:InitComponent() + -- 创建sprite加载器 + this.spLoader = SpriteLoader.New() -- this.Slider = Util.GetGameObject(self.gameObject, "Slider"):GetComponent("Slider") this.Tip = Util.GetGameObject(self.gameObject, "Slider/Image/LoadingText"):GetComponent("Text") @@ -13,15 +15,23 @@ function LoadingPanel:InitComponent() screenAdapte(Util.GetGameObject(self.gameObject, "bg2")) end -function LoadingPanel:OnOpen(sp) +function LoadingPanel:OnOpen() local index = 0 - this.bg.sprite = sp + math.randomseed(os.time()) + local spName = "loading1" + local sprites = PackageManager.GetLoadingList() + if sprites then + index = math.random(1, #sprites) + spName = sprites[index] + end + this.bg.sprite = this.spLoader:LoadSprite(spName) math.randomseed(os.time()) index = math.random(1, 20) this.Tip.text = GetLanguageStrById(tipsConfig[index].Tips) end -- 销毁时回收 function LoadingPanel:OnDestroy() + this.spLoader:Destroy() end local callList = {} local curIndex = 0 @@ -62,37 +72,23 @@ end function LoadingPanel.Start() - -- 创建sprite加载器 - this.spLoader = SpriteLoader.New() - - local spName = "loading1" - local sprites = PackageManager.GetLoadingList() - if sprites then - math.randomseed(os.time()) - local index = math.random(1, #sprites) - spName = sprites[index] + if #callList <= 1 then + return end - LoadStreamingTexture(this.spLoader, spName, function(sp) - if #callList <= 1 then - return - end - UIManager.OpenPanel(UIName.LoadingPanel, sp) - UpdateBeat:Add(update) - lerp = 0 - curIndex = 0 - this.Slider.maxValue = #callList - 1 - this.Slider.value = curIndex - --"你知道嘛:充值会让你变得更强!" --"白驹工作室倾情奉献" - LoadingPanel.OnStep() - end) + UIManager.OpenPanel(UIName.LoadingPanel) + UpdateBeat:Add(update) + lerp = 0 + curIndex = 0 + this.Slider.maxValue = #callList - 1 + this.Slider.value = curIndex + --"你知道嘛:充值会让你变得更强!" --"白驹工作室倾情奉献" + LoadingPanel.OnStep() end function LoadingPanel.End() UpdateBeat:Remove(update) this:ClosePanel() callList = {} - - this.spLoader:Destroy() end return LoadingPanel \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/misc/functions.lua b/Assets/ManagedResources/~Lua/misc/functions.lua index 136082dc97..5de6bfed7c 100644 --- a/Assets/ManagedResources/~Lua/misc/functions.lua +++ b/Assets/ManagedResources/~Lua/misc/functions.lua @@ -75,24 +75,4 @@ function ForceRebuildLayout(_transform) end LayoutRebuilder.ForceRebuildLayoutImmediate(_transform) end -end - -function LoadStreamingTexture(spLoader, name, func) - if name and name ~= "" and func then - if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_LOAD_STREAMING_TEXTURE) then - resMgr:LoadStreamingTexture(name, function(sp) - if sp then - func(sp) - else - name = string.split(name, ".")[1] - local sp = spLoader:LoadSprite(name) - func(sp) - end - end) - else - name = string.split(name, ".")[1] - local sp = spLoader:LoadSprite(name) - func(sp) - end - end end \ No newline at end of file diff --git a/Assets/Scripts/Bridge/ResourcesManager.cs b/Assets/Scripts/Bridge/ResourcesManager.cs index 7fbe68b8e5..d4f2516982 100644 --- a/Assets/Scripts/Bridge/ResourcesManager.cs +++ b/Assets/Scripts/Bridge/ResourcesManager.cs @@ -187,10 +187,6 @@ namespace GameLogic { { } - public void LoadStreamingTexture(string name, LuaFunction luaFunction) - { - resMgr.LoadStreamingTexture(name, luaFunction); - } } } diff --git a/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs b/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs index 36efb496be..b318bdb805 100644 --- a/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs +++ b/Assets/Scripts/Core/ResMgr/ResourcesMgr/Manager/ResourcesManager.cs @@ -3,10 +3,6 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using GameCore; -using UnityEngine.UI; -using UnityEngine.Networking; -using LuaInterface; - namespace ResMgr { /// @@ -123,34 +119,5 @@ namespace ResMgr { resLoader.Update(); } #endif - - - public void LoadStreamingTexture(string name, LuaFunction luaFunction) - { - StartCoroutine(LoadFromStream(name, luaFunction)); - } - public IEnumerator LoadFromStream(string name, LuaFunction luaFunction) - { - UnityWebRequest www = UnityWebRequestTexture.GetTexture(Application.streamingAssetsPath + "/Res/"+ name + ".png"); - yield return www.SendWebRequest(); - if (www.isNetworkError || www.isHttpError) - { - Debug.Log(www.error); - if (luaFunction != null) - { - luaFunction.Call(false); - } - }else - { - Texture2D tex = ((DownloadHandlerTexture)www.downloadHandler).texture; - Sprite sp = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0)); - if (luaFunction != null) - { - luaFunction.Call(sp); - } - } - } - - } } diff --git a/Assets/Scripts/GameInit/UpdatePanel.cs b/Assets/Scripts/GameInit/UpdatePanel.cs index 6472659103..a686638810 100644 --- a/Assets/Scripts/GameInit/UpdatePanel.cs +++ b/Assets/Scripts/GameInit/UpdatePanel.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using UnityEngine.UI; using UnityEngine; using ResUpdate; -using UnityEngine.Networking; namespace GameLogic { @@ -37,46 +36,35 @@ namespace GameLogic BeginUpdatePlatform(); } - public IEnumerator LoadFromStream(string name, Action act) - { - UnityWebRequest www = UnityWebRequestTexture.GetTexture(Application.streamingAssetsPath + "/Res/" + name + ".png"); - yield return www.SendWebRequest(); - if (www.isNetworkError || www.isHttpError) - { - Debug.Log(www.error); - if (act != null) - { - act(null); - } - } - else - { - Debug.Log("load success"); - Texture2D tex = ((DownloadHandlerTexture)www.downloadHandler).texture; - Sprite sp = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0)); - if (act != null) - { - act(sp); - } - } - } - private void OnEnable() { - Image img = this.transform.Find("Canvas/LoadingScreen/bg1").GetComponent(); - img.color = new Color(1f, 1f, 1f, 0f); string updatePanelBg = ConfigManager.Instance.GetConfigInfo("Setting.UPDATE_PANEL_BG.value"); - if(updatePanelBg != null && updatePanelBg != "") + if (updatePanelBg != null) { - StartCoroutine(LoadFromStream(updatePanelBg, (Sprite sp) => + if (AppConst.bundleMode) { - if (sp != null) + string path = AppConst.PersistentDataPath + "lz4/bgnc/" + updatePanelBg + ".unity3d"; + if (!File.Exists(path)) { - img.sprite = sp; + path = AppConst.StreamPath + "lz4/bgnc/" + updatePanelBg + ".unity3d"; } - img.color = new Color(1f, 1f, 1f, 1f); - })); + bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength); + if (bundle == null) + { + XDebug.Log.error(string.Format("{0} 不存在,请检查", path)); + return; + } + this.transform.Find("Canvas/LoadingScreen/bg1").GetComponent().sprite = bundle.LoadAsset(updatePanelBg); + } + else + { +#if UNITY_EDITOR + string path = AppConst.GameResPath + "/BGNC/" + updatePanelBg + ".jpg"; + Sprite sp = UnityEditor.AssetDatabase.LoadAssetAtPath(path); + this.transform.Find("Canvas/LoadingScreen/bg1").GetComponent().sprite = sp; +#endif + } } } private void OnDestroy() @@ -374,11 +362,10 @@ namespace GameLogic IEnumerator UpdateFinish() { yield return new WaitForSeconds(0.2f); - App.Instance.StartUp(); - yield return new WaitForSeconds(1f); DestroyImmediate(this.gameObject); UpdateManager.Instance.UnLoadUpdateAsset(); + App.Instance.StartUp(); } } } \ No newline at end of file diff --git a/Assets/Source/Generate/GameLogic_ResourcesManagerWrap.cs b/Assets/Source/Generate/GameLogic_ResourcesManagerWrap.cs index 04283b09ad..2367a7777e 100644 --- a/Assets/Source/Generate/GameLogic_ResourcesManagerWrap.cs +++ b/Assets/Source/Generate/GameLogic_ResourcesManagerWrap.cs @@ -18,7 +18,6 @@ public class GameLogic_ResourcesManagerWrap L.RegFunction("HaveAsset", HaveAsset); L.RegFunction("UnLoadAll", UnLoadAll); L.RegFunction("Reset", Reset); - L.RegFunction("LoadStreamingTexture", LoadStreamingTexture); L.RegFunction("New", _CreateGameLogic_ResourcesManager); L.RegFunction("__tostring", ToLua.op_ToString); L.RegVar("isLoading", get_isLoading, set_isLoading); @@ -253,24 +252,6 @@ public class GameLogic_ResourcesManagerWrap } } - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int LoadStreamingTexture(IntPtr L) - { - try - { - ToLua.CheckArgsCount(L, 3); - GameLogic.ResourcesManager obj = (GameLogic.ResourcesManager)ToLua.CheckObject(L, 1); - string arg0 = ToLua.CheckString(L, 2); - LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3); - obj.LoadStreamingTexture(arg0, arg1); - return 0; - } - catch (Exception e) - { - return LuaDLL.toluaL_exception(L, e); - } - } - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_isLoading(IntPtr L) {