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

glb import from network share failed #37

Closed
fagerburg opened this issue May 30, 2019 · 4 comments
Closed

glb import from network share failed #37

fagerburg opened this issue May 30, 2019 · 4 comments

Comments

@fagerburg
Copy link

I tried to import a .glb from a network share and got the following error.

HTTP/1.1 502 Bad Gateway \\server\share\file.glb
UnityEngine.Debug:LogErrorFormat(String, Object[])
GLTFast.<LoadRoutine>d__6:MoveNext() (at Assets/GLTFast/GltfAsset.cs:41)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
@atteneder
Copy link
Owner

Hi,
I think the error message says it all: that is not a valid HTTP URL.
What you can try is to mount the network share and load the file like a regular local file. To do this set the GltfAsset.url to the local path, prefixed with file://, which indicates that it is a local path. On macOS this might look something like file:///Volumes/Sharename/path/to/file.glb.
The download is done via UnityWebRequests. If a manual download via this class works for you, reopen the issue.

@fagerburg
Copy link
Author

@atteneder in the use case I'm pursuing, asking all of my users to mount the file share locally isn't a very viable approach, would something like this fall under enhancement instead of issue?

@atteneder
Copy link
Owner

atteneder commented May 30, 2019

To me loading the file from something else than local file system or HTTP is not a goal. I'd also rather create an interface, so 3rd party developers can hook up their file-system-abstraction than integrate more functionality here.

But...UnityWebRequest (and glTFast alike) do support local files as well as HTTP, so you could host your content on a HTTP web server, be it internal or public.

@fagerburg
Copy link
Author

totally understand, thanks for the info!

atteneder added a commit that referenced this issue Oct 18, 2023
* chore: Fixed formatting and license header

* chore: Updated and complemented trademark section

- Required legal text according to Khronos trademark guidelines https://www.khronos.org/legal/trademarks/

* chore: Renamed package

* fix: Markdown links like this don't work with the documentation generator.

* fix: Markdown linting and typos

* doc: Renamed chapter to align with other Unity package projects

* doc: Trademark related edits

* doc: Markdown linting and typos

* doc: Fixed Doxygen formatting by adding newlines (that markdown linter suggested anyways)

Co-authored-by: Andreas Atteneder <andreas.atteneder@gmail.com>
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