You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useGLTF does not work in android emulator. Although, it is possible to load objects in expo for web, once the code is launched in emulator, it produces different sorts of errors. I have tried multiple ways (found in documentation and stackoverflow) of using the function.
My metro.config.js already has glb extension enabled:
Error: Could not load ./assets/pine.glb: Call to function 'ExponentFileSystem.downloadAsync' has been rejected.
→ Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
This fragment, works in web, but fails on Android:
ERROR Error: Could not load 5: undefined
This error is located at:
in Unknown
in FiberProvider
in CanvasWrapper (created by App)
in Suspense (created by App)
in App (created by withDevTools(App))
in withDevTools(App)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent), js engine: hermes
Using other path for a model throws a standard error that file not found so I'm pretty sure that the path is correct
The text was updated successfully, but these errors were encountered:
Note that we're waiting for fixes to upstream into react-native 0.74 to load embedded textures in GLB. Use gltfjsx and split up textures for now if you have to.
three
version: 0.157.0@react-three/fiber
version: 8.14.3@react-three/drei
version: 9.86.1node
version: 20.3.0yarn
version: 1.22.11Problem description:
useGLTF does not work in android emulator. Although, it is possible to load objects in expo for web, once the code is launched in emulator, it produces different sorts of errors. I have tried multiple ways (found in documentation and stackoverflow) of using the function.
My metro.config.js already has glb extension enabled:
The following code fragment (pine.glb is in assets folder, the code fragment is in root folder)
throws
This fragment, works in web, but fails on Android:
the result is:
Using other path for a model throws a standard error that file not found so I'm pretty sure that the path is correct
The text was updated successfully, but these errors were encountered: