CesiumGS / CesiumGS/cesium-unity

Add support for file:// URLs

Open
#249 8 comments 11 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
535
Forks
132
Avg merge
6h 45m
Merged PRs (30d)
1

Description

Unity's [UnityWebRequest](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.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`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.