From 66ef50a9e05f1b783bff1a75f7ac7b143eb554af Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Wed, 19 Jul 2023 15:51:16 +0800 Subject: [PATCH] =?UTF-8?q?WebGL=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/TEngine/Runtime/GameFramework/Bugly/BuglyManager.cs | 6 ++++-- Assets/TEngine/Runtime/GameFramework/RootModule.cs | 2 ++ .../GameFramework/Utility/Utility.DevicePerformance.cs | 6 ++++-- .../Runtime/Plugins/Android/BuglyPlugins/BuglyAgent.cs | 4 +++- .../Runtime/Plugins/Android/BuglyPlugins/BuglyInit.cs | 3 ++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Assets/TEngine/Runtime/GameFramework/Bugly/BuglyManager.cs b/Assets/TEngine/Runtime/GameFramework/Bugly/BuglyManager.cs index 750c0772..42e8e1ac 100644 --- a/Assets/TEngine/Runtime/GameFramework/Bugly/BuglyManager.cs +++ b/Assets/TEngine/Runtime/GameFramework/Bugly/BuglyManager.cs @@ -1,4 +1,5 @@ -using UnityEngine; +#if !UNITY_WEBGL +using UnityEngine; namespace TEngine { @@ -87,4 +88,5 @@ namespace TEngine BuglyAgent.ConfigDefault(channel = null, version, userID = "Unknow", time = 0); } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Assets/TEngine/Runtime/GameFramework/RootModule.cs b/Assets/TEngine/Runtime/GameFramework/RootModule.cs index 1224b67f..33869966 100644 --- a/Assets/TEngine/Runtime/GameFramework/RootModule.cs +++ b/Assets/TEngine/Runtime/GameFramework/RootModule.cs @@ -109,7 +109,9 @@ namespace TEngine { base.Awake(); +#if !UNITY_WEBGL BuglyManager.Instance.Init(Resources.Load("BuglyConfig")); +#endif GameTime.StartFrame(); diff --git a/Assets/TEngine/Runtime/GameFramework/Utility/Utility.DevicePerformance.cs b/Assets/TEngine/Runtime/GameFramework/Utility/Utility.DevicePerformance.cs index cb4ef896..cbd389bc 100644 --- a/Assets/TEngine/Runtime/GameFramework/Utility/Utility.DevicePerformance.cs +++ b/Assets/TEngine/Runtime/GameFramework/Utility/Utility.DevicePerformance.cs @@ -1,4 +1,5 @@ -using UnityEngine; +#if !UNITY_WEBGL +using UnityEngine; namespace TEngine { @@ -172,4 +173,5 @@ namespace TEngine High } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyAgent.cs b/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyAgent.cs index 0da4a0b1..79a9e637 100644 --- a/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyAgent.cs +++ b/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyAgent.cs @@ -1,3 +1,4 @@ +#if !UNITY_WEBGL // ---------------------------------------- // // BuglyAgent.cs @@ -1083,4 +1084,5 @@ public sealed class BuglyAgent #endregion -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyInit.cs b/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyInit.cs index ff6b5a70..440963f0 100644 --- a/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyInit.cs +++ b/Assets/TEngine/Runtime/Plugins/Android/BuglyPlugins/BuglyInit.cs @@ -9,6 +9,7 @@ // // ---------------------------------------- // +#if !UNITY_WEBGL using UnityEngine; using System.Collections; using System.Collections.Generic; @@ -77,4 +78,4 @@ public class BuglyInit : MonoBehaviour return extras; } } - +#endif