CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
347 stars 83 forks source link

Add support for multiple Cesium ion servers #383

Closed kring closed 9 months ago

kring commented 10 months ago

This is the Unity equivalent of https://github.com/CesiumGS/cesium-unreal/pull/1309.

joseph-kaile commented 9 months ago

Works well, one suggestion:

It would be nice to have the host url in the error message as well:

Exception: Request failed: Cannot resolve destination host UnityEngine.Debug:LogError (object) Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLogError_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:3023) CesiumForUnity.CesiumIonSession:Tick () (at ./Reinterop/Reinterop.RoslynSourceGenerator/CesiumIonSession-generated.cs:233) CesiumForUnity.CesiumEditorUtility:UpdateIonSession () (at ./Packages/com.cesium.unity/Editor/CesiumEditorUtility.cs:26) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

kring commented 9 months ago

Thanks @joseph-kaile, I've added the URL to the error message. Error messages look like this now:

[2023-12-12 09:46:39.568] [error] [TilesetContentManager.cpp:817] An unexpected error occurred when loading tile: Request for `https://invalid.example.com/v1/assets/1/endpoint?access_token=` failed: Cannot resolve destination host
j9liu commented 9 months ago

Thanks @kring! Merging now.