diff --git a/CHANGES.md b/CHANGES.md index 63a3c184..38e8f8f9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,11 +7,13 @@ - Fixed broken support for `TRIANGLE_FAN` primitives in tile meshes. - Fixed editor crash when any scale component on `Cesium3DTileset` was set to zero. - Fixed a bug where CameraFlyToController, after the user interrupted a flight, would jump to the middle of the flight path immediately upon starting the next flight. +- Fixed a bug related to using offline tilesets in Editor without internet connection. ## v1.16.1 - 2025-06-02 This release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.47.0 to v0.48.0. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. +>>>>>>> main ## v1.16.0 - 2025-05-01 ##### Additions :tada: diff --git a/Editor/CesiumEditorUtility.cs b/Editor/CesiumEditorUtility.cs index f6edd7fb..78f8eff5 100644 --- a/Editor/CesiumEditorUtility.cs +++ b/Editor/CesiumEditorUtility.cs @@ -21,6 +21,8 @@ static CesiumEditorUtility() static void UpdateIonSession() { + if (!IsNetworkReachable()) + return; try { CesiumIonServerManager.instance.currentSession.Tick(); @@ -34,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) {