Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question CollisionMeshData couldn't be created because the mesh has been marked as non-accessible

Discussion in 'General Graphics' started by PokemonMasterYun, Aug 23, 2023.

  1. PokemonMasterYun

    PokemonMasterYun

    Joined:
    Apr 7, 2022
    Posts:
    1
    Hi there
    It's about the Import Settings of fbx. I donot mark the fbx read/write. then I get the error in a build:
    CollisionMeshData couldn't be created because the mesh has been marked as non-accessible
    I Searched and tried a lot. I can sure that there are not any specific circumstances spelled out in:
    https://docs.unity3d.com/ScriptReference/Mesh-isReadable.html

    What I find is:
    1. If I build the fbx in different assetbundles with the scene, I get the error in the build.(I create a gameobject in the scene and add a MeshCollider to it. Then set the mesh of fbx to the Mesh Collider)
    2. If I only create the assetbundle which contains the scene, It works fine. (I guess that fbx is contained in the assetbundle too, because the size assetbundle is bigger than in 1.)
    3. If I donot create the assetbundle, add the scene in build list. It works fine.
    4. If I mark Generate Colliders, It also works fine, but the size of assetbundle and the runtime memory usage add a lot.
    5. I mark Prebak Collision Meshes. It seems not work.
    What I want to know:
    1. Is it the only way (mark read/write) to use the mesh fbx in different assetbundbles.(I hope to disable the read/write to save runtime memory usage)
    2. any info of Generate Colliders
    sorry for my poor English skills.
    please help me
    thank you for your attention