- Home /
All cloth objects missing in build
I have a single scene, it has a terrain and some rocks, player objectives, and the player model/control. There is also "seaweed" objects, which are long thin planes with cloth components attached. When playing back in editor, all the objects are there, and everything works. When playing a build, the seaweed is gone. ALL of them. Everything else is there, and still functioning, it is just the seaweed.
I've tried Unpacking all of their assets, and also re-arranging their placements in the hierarchy. They just vanish, or never get integrated into the build. I'm not sure exactly. I haven't tried "Everything" i have in mind yet, in case it's something completely obvious that I overlooked.
For now, I'm gonna back up my project, and then try re-importing all assets, as well as trying out methods of spawning in the seaweed post startup.
I am back with progress, building with Developer mode checked and log file brought me to an error. Cannot initialize Cloth: Unable to extract collision mesh
(Filename: ./Modules/Cloth/Cloth.cpp Line: 281)
CollisionMeshData couldn't be created because the mesh has been marked as non-accessible. Mesh asset path "" Mesh name "Plane"
This has brought me to this issue tracker, which just says "By Design" and zero advice on how to address the issue directly... which is totally rad /s "https://issuetracker.unity3d.com/issues/meshrenderer-mesh-cannot-be-accessed-when-running-not-in-editor-if-the-gameobject-was-instantiated-from-a-fbx-model"
Answer by LettucePie · Jul 27, 2019 at 06:08 AM
I have resolved the issue, surprisingly simple and obvious like I guessed it would be. I had to go to the mesh/model that was being used or cloth, and enable Read/Write in the import settings. Link is to the answer that helped.
Thank you very much, it works!!! I found that this issue only appears on those who are not originally skinned meshes. After attaching "Cloth" component, Mesh Renderer will be replaced as Skinned Mesh Renderer and the bug appears only in Build. So annoying XD BTW, the version I'm using is 2020.1.0f1
Answer by SrDidE · Dec 09, 2021 at 12:28 PM
@LettucePie I have no import settings in my imported model, made FBX from Blender and added as new Asset, any idea?
Thats the model properties in the scene. What @LettucePie mean is in the Project tab, you go to your model (FBX), expand it and click on the model. There you have the Read/Write check box.
Hope it helps!