# Issues while loading from URL

**URL:** <https://community.cesium.com/t/issues-while-loading-from-url/22886>\
**Category:** Cesium for Unity\
**Created:** [March 15, 2023, 8:46am UTC](https://community.cesium.com/t/issues-while-loading-from-url/22886 "2023-03-15T08:46:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liem](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/liem/32/11887_2.png) [@Liem](https://community.cesium.com/u/Liem)\
**Post date:** [March 15, 2023, 8:46am UTC](https://community.cesium.com/t/issues-while-loading-from-url/22886/1 "2023-03-15T08:46:36Z")

</div>

Hi,

I’m loading tiles “from url” and facing the following problems:

1. Failure to read the data when the URL (file path) includes a space. While the root tiles.json is parsed correctly the rest of the data fails with a misleading error message (Received status code 404 for tile content [http://localhost/Data/](http://localhost/Data/)…)

2. Same when the 3dtiles data is located on an unmapped network drive (\MyReadyNAS\Media), the root json is parsed correctly but the rest of the hierarchy fails to load.

Please advice as we cannot force all the users to avoid spaces in their paths or to stop using unmapped network drives

Thanks

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [March 16, 2023, 9:53pm UTC](https://community.cesium.com/t/issues-while-loading-from-url/22886/2 "2023-03-16T21:53:32Z")

</div>

Cesium for Unity loads tileset.json and tile payloads using Unity’s [UnityWebRequest](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.html). Unfortunately it does not seem to support `file://` URLs, which is how we recommend users access local files in Cesium for Unreal. It does support raw paths, but those cause problems inside cesium-native because it assumes it’s working with valid URLs. For example, to resolve a tile payload relative to the tileset.json, it uses URL resolution rules.

I wrote an issue to address this:

> <https://github.com/CesiumGS/cesium-unity/issues/249>
>
> Unity's \[UnityWebRequest\](https://docs.unity3d.com/ScriptReference/Networking.Un…ityWebRequest.html) does not support \`file://\` URLs, meaning that - unlike Cesium for Unreal (\[at least on Windows\](https://github.com/CesiumGS/cesium-unreal/issues/378)) - it's not possible for users to use them to access local files. It does support raw file paths, but this sometimes breaks in cesium-native when uriparser doesn't consider a local file path to be a valid URL.
> 
> So, we should add explicit \`file://\` URL support to \`UnityAssetAccessor\`. When it sees these URLs, it can either read the file from disk directly, or it can turn the URL into a regular file path and pass it to \`UnityWebRequest\`.

This is probably not going to make it to our short-term roadmap, but we’d welcome a pull request for it if you’re up for it.

---

<div class="post-metadata">

**Author:** ![Liem](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/liem/32/11887_2.png) [@Liem](https://community.cesium.com/u/Liem)\
**Post date:** [March 20, 2023, 2:50pm UTC](https://community.cesium.com/t/issues-while-loading-from-url/22886/3 "2023-03-20T14:50:51Z")

</div>

Thanks a lot Kevin, we’ll wait for the fix and will use a workaround in the meantime

---

<div class="post-metadata">

**Author:** ![Tkorho89](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/tkorho89/32/12429_2.png) [@Tkorho89](https://community.cesium.com/u/Tkorho89)\
**Post date:** [February 26, 2024, 1:48pm UTC](https://community.cesium.com/t/issues-while-loading-from-url/22886/4 "2024-02-26T13:48:12Z")

</div>

I also have this same issue when I try to load local tilesets from network drive (path is like this [//xx.xxx.xxx.xxx/networkdrive/Common/Tileset/tileset.json](https://xx.xxx.xxx.xxx/networkdrive/Common/Tileset/tileset.json)) and I got these errors for every tilesets:

Curl error 28: Failed to connect to xx.xxx.xxx.xxx port 80 after 21034 ms: Timed out  
[2024-02-26 15:40:57.347] [error] [TilesetContentManager.cpp:729] An unexpected error occurs when loading tile: Request failed: Request timeout

Is this the same problem or something else? Any workaround advices would be welcome.
