I ran fine on Windows, but when I built it and ran it in ios webview, gltfFileLoader reported an error!! Here is some error-related information
Because the project needs to be kept secret, it cannot be displayed on pg
AssetsManager imports the model:
loader version:7.31.2
error addr:
error info:
Any help you can provide would be greatly appreciated!
It looks like there is a problem with the GLTF model. Have you put the model on the sandbox to check
Yes, I tested it and it looks fine on the sandbox
It works fine in the windows browser , so I should be able to rule out issues with the gltf model
It seems that the loaded data is undefined.
Can interrupt point query
I switched to another project whose babylonjs version is 7.16.0 and it works fine on ios webview.
When I switched the version of the project that reported the error to 7.16.0, it was another error
So I have to suspect the AssetsManager problem, although I don’t know if the AssetsManager source code is the same as the SceneLoader.ImportMesh.
Yes, the error shows that the data is undefined
But I can’t seem to do anything, I don’t know why I return undefined
Okay, let’s try using fetch to load the model first. Can it return an array buffer?
yes! An arrayBuffer returned;
@brightMoon
labris
October 30, 2024, 11:30am
10
If your ArrayBuffer is OK, you may try to load from it as described here - Babylon.js docs
sebavan
October 30, 2024, 10:31pm
11
You should be able to repro in the playground by doing smthg similar with other glbs so we have no idea about your project.
Without repro, we are shooting in the dark unfortunately
After a lot of testing, I found that it was probably caused by using indexedDB on ios . When useCache was set to false , it worked fine. When usecache was set to true , an error was reported. I don’t know how to solve this problem on ios, but I will analyze if this is the reason