GLTFUtility icon indicating copy to clipboard operation
GLTFUtility copied to clipboard

Enable library to load Gltf json files from the web

Open SimonDarksideJ opened this issue 3 years ago • 2 comments

Currently, the project only enabled loading of gLTF files already present in the project. It does allow for remote uri GLB's to be loaded, but not gLTF's

Can this be extended easily?

SimonDarksideJ avatar Oct 19 '20 00:10 SimonDarksideJ

I am also looking to do this.

Currently I have my project running in webGL.

I get the filepath to my glb files from my StreamingAssets folder in my WebGL project public static string currentModelFileName = Path.Combine(Application.streamingAssetsPath, "");

then I attempt to load in the glb files. Importer.LoadFromFileAsync(currentModelFileName,new ImportSettings(),onLoaded);

However i get the following error:

DirectoryNotFoundException: Could not find a part of the path ‘/file:/...../StreamingAssets’

Any suggestions on what to do or how to fix would be very much appreciated!

ucabcnd avatar Jun 25 '21 19:06 ucabcnd

When I investigated this previously, just changing the top level is not enough as the "download" features are spread around the project. In the XRTK we hit the same thing with the Khronos gLTF importer and published a variant that can handle web downloads (https://github.com/XRTK/glTF) however, this currently does have a dependency on having the XRTK in the project (or at least a copy of the Async/Rest components)

You can see the changes as a reference where all the intersection points are.

Main difference between the base Khronos gLTF importer and Siccity is that it doesn't natively support animations.

SimonDarksideJ avatar Jun 28 '21 10:06 SimonDarksideJ