viro icon indicating copy to clipboard operation
viro copied to clipboard

Update Code Push not show resource of 3d object

Open duyta7598 opened this issue 2 years ago • 2 comments

  • [x] Review the documentation: https://docs.viromedia.com/
  • [x] Search for existing issues: https://github.com/viromedia/viro
  • [x] Use the latest ViroReact release: https://docs.viromedia.com/docs/releases

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: Android 12
  3. Version: ViroReact version: ^2.22.0 and React Native version: 0.63.2
  4. Device(s): Galaxy Note 20 Ultra

Description

  • I used React Native Code Push in my project for update, but after update, resource of all object 3d is missing
  • It's works fine in release without code push, but error after update photo_2022-04-05_20-35-30

<Viro3DObject source={require("./hop_qua_lac_lu.vrx")} resources={[require("./giftTex.png")]} position={randomPosition} scale={[0.02, 0.02, 0.02]} type="VRX" animation={{ name: "giftJnts|giftJnts|Take 001|BaseLayer", delay: 1000, loop: true, run: true, }} onClick={() => { actionGetGift() }} lightReceivingBitMask={3} shadowCastingBitMask={2} />

I don't know if the problem is in Viro or Code Push, source and resources have changed to uri but still no work

Anyone knows about it?

duyta7598 avatar Apr 05 '22 13:04 duyta7598

I experienced this issue with Android only

Try following codepush documentation to extract the bundled resources to a directory. You should see in the raw directory that the only things bundled from viro will be the everything BUT the textures.

It may be linked to how resources are working inside of android.

I fixed this issue by moving theses textures to a server and referencing these from a setMaterial call.

Also please note I am using the viro community fork (which I think you should also be using)

francois-pasquier avatar Apr 07 '22 07:04 francois-pasquier

Thank you sir, Before I tried to use "{uri: ..}" in source and resource in stead of "require()" but still no luck. I will fix as your way

duyta7598 avatar Apr 07 '22 08:04 duyta7598