Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ability to read files in Android StreamingAssets #96

Open
sableangle opened this issue May 24, 2022 · 1 comment
Open

The ability to read files in Android StreamingAssets #96

sableangle opened this issue May 24, 2022 · 1 comment

Comments

@sableangle
Copy link

On Android platform, streamingAssets is place inside APK file.
Like this: "jar:file://" + Application.dataPath + "!/assets".

The recommend way to load those assets by Unity is to use UnityWebRequest to send a request to download a file.

I try to replace the UnityWebRequest directly by using the Best/Https's HTTPRequest, but seems HTTPRequest is not support the scheme "jar:file://" and return errors.

@Arakade
Copy link

Arakade commented Dec 27, 2023

+1

Just trying to port an app using Best HTTP for all loading to Android. We use "SteamingAssets" for user-readable level files and it's failing complaining:

BestHTTP.AsyncHTTPException
System.ArgumentOutOfRangeException
Specified argument was out of the range of valid values.
Parameter name: port

Could a viable workaround start with special-casing URLs starting "jar:file:" on Android platform? (perhaps to use Unity's WebRequest for now?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants