Bug / Crash IndexOutOfRange in ClothProxy on Android - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html) +--- Thread: Bug / Crash IndexOutOfRange in ClothProxy on Android (/thread-2788.html) |
IndexOutOfRange in ClothProxy on Android - JanikH - 04-03-2021 Hi, when running our game on Android we're currently running into the following exception: Code: IndexOutOfRangeException: Index was outside the bounds of the array. This does not occur when running in the editor. We're using ObiCloth 6.0.1 with Unity 2020.2.4f1. I made sure to regenerate the blueprint and rebind the skin map. Any pointers as to what the issue may be? RE: IndexOutOfRange in ClothProxy on Android - josemendez - 04-03-2021 That line simply reads the mesh tangent vectors, which makes me suspect your mesh has none in the build. If you have this flag enabled: https://docs.unity3d.com/ScriptReference/PlayerSettings-stripUnusedMeshComponents.html?_ga=2.93604894.2005016332.1583224178-1954860595.1583224178 Unity will remove all mesh data that's not used in shaders at build time. This will strip away tangents, vertex colors, etc. even if some scripts use them. Will also break shaders/lighting if you switch shaders at runtime. Personally not a big fan of it :/. Try disabling this flag if you have it enabled. RE: IndexOutOfRange in ClothProxy on Android - JanikH - 04-03-2021 Thanks for the quick response! That was exactly the problem! I'm just a bit confused as to why the issue appeared only now... Oh well, Unity I guess. RE: IndexOutOfRange in ClothProxy on Android - josemendez - 04-03-2021 (04-03-2021, 05:52 PM)JanikH Wrote: Thanks for the quick response! That was exactly the problem! This setting removes mesh data at build time. So the data is there in editor, but once you build... poof! Your mesh tangents are gone. So yes, enabling this reduces memory usage, but breaks scripts and shaders. So not that useful in many cases. |