Search Unity

Cloth physics not rendering on Android

Discussion in 'Universal Render Pipeline' started by Tartiflette, Oct 14, 2019.

  1. Tartiflette

    Tartiflette

    Joined:
    Apr 10, 2015
    Posts:
    84
    I'm experiencing what I believe is a bug in the URP: objects with cloth physics work perfectly fine in the editor but not on Android. I think it could be that the skinned mesh renderer gets culled because the entity doesn't have any bones or morph maps, ignoring the fact that it definitely has a cloth component attached.

    To confirm my suspicions I have tried to add a morph map to my mesh, at which point it did start rendering, but no longer received physics. I also tried having the mesh with a skinned renderer without any cloth physics, and it stopped rendering on Android (confirming that the cloth component has nothing to do with it).

    Does anyone know if I'm missing something, or if there are workarounds?
    Many thanks
     
  2. cvasquez-coiron

    cvasquez-coiron

    Joined:
    Nov 10, 2014
    Posts:
    22
    Which Unity version are you using? I'm facing the same issue with the Cloth component on Android, using Unity 2019.1.6f1.
     
  3. Tartiflette

    Tartiflette

    Joined:
    Apr 10, 2015
    Posts:
    84
    I'm using 2019.3.b7 with URP 7.1.2
     
  4. cvasquez-coiron

    cvasquez-coiron

    Joined:
    Nov 10, 2014
    Posts:
    22
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Hi!
    Do you see any errors in logcat?
     
  6. BlinksTale

    BlinksTale

    Joined:
    Dec 15, 2013
    Posts:
    13
    Hello! I got this error (cloth object not appearing on mobile iOS/Android) and the Xcode log said:
    "CollisionMeshData couldn't be created because the mesh has been marked as non-accessible."

    So the fix was to enable read/write in model Import Settings (so go to the asset for the mesh/3d model itself, and click "read/write enabled" to turn it on in inspector). That was it!
     
    brano42, SI-Shawn, DadNapper and 11 others like this.
  7. ArshakKroyan

    ArshakKroyan

    Joined:
    Mar 4, 2015
    Posts:
    32
  8. Giannigiardinelli

    Giannigiardinelli

    Joined:
    May 8, 2014
    Posts:
    189
    Thank you it work !
     
  9. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    To clarify: Read/Write access on the meshes modell that require cloth physics always had to be enabled. I think this is no new behaviour.
     
  10. mahito2932

    mahito2932

    Joined:
    Nov 15, 2020
    Posts:
    115
    It work perfectly even without read/write enabled but sometimes it depend a lot from mesh itself. For example if you haven't applied a modifier on blender to your mesh like (mirror or bevel) after building it for android it just disappears, after i applied and rebuild it again it appeared without problems. So i did some tests and result is that modifier can cause that as well.
     
  11. brano42

    brano42

    Joined:
    Aug 25, 2020
    Posts:
    78
    Thanks !!!