Had a 5.1 plugin working fine that would load my tiles at file:///C:\NC1_3DTILES\tileset.json via the Cesium3DTileset actor.
Now in the 5.3 plugin this no longer works and I get this error:
LogCesium: Loading tileset from URL file:///C:\NC1_3DTILES\tileset.json
LogCesium: Loading tileset from URL file:///C:\NC1_3DTILES\tileset.json done
LogHttp: Warning: ProcessRequest failed. URL ‘file:///C:\NC1_3DTILES\tileset.json’ is not a valid HTTP request.
LogHttp: Warning: 000007199E010A00: request failed, libcurl error: 0 (No error)
LogCesium: Error: [2023-09-27 21:11:30.071] [error] [TilesetContentManager.cpp:739] An unexpected error occurred when loading tile: Connection failed.
Epic has unfortunately removed support for file URLs in UE 5.3. More details here:
opened 01:29PM - 23 Apr 21 UTC
bug
According to a [question about loading tilesets from files under Linux](https://… community.cesium.com/t/loading-tilesets-from-files-under-linux/13313) from the forum, there might be an issue with the current approach of loading tilesets using the standard `UnrealAssetAccessor`.
The `UnrealAssetAccessor` uses the `IHttpRequest` to resolve the requests. But under linux, it might be necessary to use an `IPlatformFile` for local file requests, because on Linux, the libcurl library that is used in Unreal Engine is compiled with the `file` protocol being disabled.
This behavior has to be verified. If this turns out to be a problem, then it might be easy to fix, by just checking the protocol of the URL, and either using an `IHttpRequest` or an `IPlatformFile`, roughly at https://github.com/CesiumGS/cesium-unreal/blob/3daac114185202a8ee28b058d1131b401bad37dd/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp#L131
---
Edit: I think that it would be better in many ways to have the option to load local tilesets in `cesium-native` itself. This would essentially mean to move the https://github.com/CesiumGS/cesium-native/blob/main/Cesium3DTiles/test/SimpleAssetAccessor.h or the https://github.com/CesiumGS/cesium-native/pull/127/files#diff-43c4884466567e2f908defe62c8ba7921b5310694a2dcf3ec0501cbc5e520f9d from the "test" package into the actual `cesium-native` core. This would allow to create an `IAssetAccessor` that "dispatches" either to the current `UnrealAssetAccessor` or the `FileAssetAccessor`, depending on the protocol.
This isn’t something we can fix (only Epic can), but we’ll likely implement a workaround in a future version. In the meantime, you can stick with UE 5.2, or you can run a local web server to serve your data on an HTTP URL.
1 Like