From bb352b546b5610be97f1d688b9cd9c52c56c2d0c Mon Sep 17 00:00:00 2001 From: Hasan Berk KARABAY <85685449+Heisenberk-Karabay@users.noreply.github.com> Date: Fri, 16 May 2025 16:56:21 +0300 Subject: [PATCH 1/3] Editor: Skip CesiumIonSession.Tick() when Unity is offline Problem ------- If the Unity Editor launches without an Internet connection, CesiumIonServerManager.instance.currentSession.Tick() throws every frame because the DNS lookup for https://api.cesium.com fails. The result is an endless stream of red-error messages: Exception: Request for `https://api.cesium.com/appData` failed: Cannot resolve destination host Exception: Failed to obtain _appData, can't resume connection The spam clutters the Console and can even interrupt later domain reloads. Change ------ Added a single guard clause at the top of Editor/CesiumEditorUtility.UpdateIonSession(): if (Application.internetReachability == NetworkReachability.NotReachable) return; When Unity reports that the machine is offline the function now returns immediately, so the session is ticked again only after connectivity is restored. --- Editor/CesiumEditorUtility.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Editor/CesiumEditorUtility.cs b/Editor/CesiumEditorUtility.cs index f6edd7fb..67c95936 100644 --- a/Editor/CesiumEditorUtility.cs +++ b/Editor/CesiumEditorUtility.cs @@ -21,6 +21,8 @@ static CesiumEditorUtility() static void UpdateIonSession() { + if (Application.internetReachability == NetworkReachability.NotReachable) + return; try { CesiumIonServerManager.instance.currentSession.Tick(); From dca9002dab5de1a81dc77ffc1db69af3191dbac6 Mon Sep 17 00:00:00 2001 From: Hasan Berk KARABAY <85685449+Heisenberk-Karabay@users.noreply.github.com> Date: Wed, 28 May 2025 10:46:34 +0300 Subject: [PATCH 2/3] comprehensive network-reachability check --- Editor/CesiumEditorUtility.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Editor/CesiumEditorUtility.cs b/Editor/CesiumEditorUtility.cs index 67c95936..78f8eff5 100644 --- a/Editor/CesiumEditorUtility.cs +++ b/Editor/CesiumEditorUtility.cs @@ -21,7 +21,7 @@ static CesiumEditorUtility() static void UpdateIonSession() { - if (Application.internetReachability == NetworkReachability.NotReachable) + if (!IsNetworkReachable()) return; try { @@ -36,6 +36,28 @@ static void UpdateIonSession() } } + private static bool IsNetworkReachable() + { + switch (Application.internetReachability) + { + case NetworkReachability.ReachableViaCarrierDataNetwork: + // Reachable via carrier data network + return true; + + case NetworkReachability.ReachableViaLocalAreaNetwork: + // Reachable via Local Area Network. + return true; + + case NetworkReachability.NotReachable: + // Not Reachable. + return false; + + default: + // Not Reachable. + return false; + } + } + static void HandleCesium3DTilesetLoadFailure(Cesium3DTilesetLoadFailureDetails details) { From de9939ac8fb2c6f33c89586bda4f6d5831de103c Mon Sep 17 00:00:00 2001 From: Hasan Berk KARABAY <85685449+Heisenberk-Karabay@users.noreply.github.com> Date: Thu, 29 May 2025 09:59:44 +0300 Subject: [PATCH 3/3] Update CHANGES.md --- CHANGES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index fd7d92c9..31123b11 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ # Change Log +## ? - ? + +##### Additions :tada: + +##### Fixes :wrench: +- Fixed a bug related to using offline tilesets without internet connection. + ## v1.16.0 - 2025-05-01 ##### Additions :tada: