Search Unity

Mesh Collider needs transform to be marked as readable? BUG

Discussion in 'Editor & General Support' started by TheCGMaster, Jun 30, 2016.

  1. TheCGMaster

    TheCGMaster

    Joined:
    May 11, 2016
    Posts:
    21
    I have played my game many times! and right now it just started to make this error on the mesh colliders which means i cant play it!!!

    Error : This MeshCollider requires the mesh to be marked as readable in order to be usable with the given transform.

    What do i do to fix it!!!!
     
    swanoff likes this.
  2. WillemKokke

    WillemKokke

    Joined:
    Sep 6, 2014
    Posts:
    31
    I've been getting that recently, it starts quite often after I do a build or leave the editor running overnight

    Restarting unity fixes it for me.
     
  3. Weatherstone-Studio

    Weatherstone-Studio

    Joined:
    Mar 4, 2015
    Posts:
    2
    This MeshCollider requires the mesh to be marked as readable in order to be usable with the given transform.
    UnityEditor.HostView:OnGUI()

    I get this error only on the Multistory Dungeons Asset after I installed the 5.4 update. It has not occurred on other asset related games. I've tried all I know to fix this including creating a new project and importing the latest version of the Multistory Dungeons Asset. Didn't help. As mentioned this error has not happened in any other game scenarios.

    UPDATE: I deleted the offending meshes and replaced them with the prefabs from the asset folder that came with Multistory Dungeons. The error was specific to the meshes in the demo scene and not the prefabs in the asset folder. So the problem is fixed in my scene but something corrupted(?) or the meshes were off from the provider originally and the updated Unity build caught the difference. The scene worked fine before the 5.4 update.
     
    Last edited: Jun 30, 2016
  4. sonof9

    sonof9

    Joined:
    Oct 20, 2015
    Posts:
    1
    Some assets in a package I imported gave this error and others did not. I had to go into the models of the offending assets and check read/write, the click "Apply".
     
    fatihsariopk, suasm, erberus and 9 others like this.
  5. Mana-Station

    Mana-Station

    Joined:
    Apr 27, 2015
    Posts:
    168
    Sorry for the delay guys, just noticed the problem exists for some people. I'm trying to reproduce the bug now and will keep you posted.
    @ComWorks Do you remember the names of the problematic objects? At least one name would be great to get an idea of what's going on :) Thanks.
     
  6. JeffG

    JeffG

    Joined:
    Oct 21, 2013
    Posts:
    85
    I am getting it on

    Scene: Presets old

    Stair_Bottom_Decor_03 (Parent Module_14)
    Stair_Big_01 (Module_20)
    Railing_Stair_Big_02
    Railing_Stair_Big_Flat_01
     
  7. Mana-Station

    Mana-Station

    Joined:
    Apr 27, 2015
    Posts:
    168
    @JeffG Thank you for the info! I'll try to figure out what's wrong with those prefabs. I still cannot reproduce the bug, though...
     
  8. mafinitz

    mafinitz

    Joined:
    Jan 22, 2015
    Posts:
    1
    I just hit this problem with MSD and I also found what *I* was doing to cause it. When scaling certain prefabs by -1, I was getting this issue. Changing scale back to 1 removed the issue, and I just used the provided, already flipped prefabs.
     
  9. Mana-Station

    Mana-Station

    Joined:
    Apr 27, 2015
    Posts:
    168
    @mafinitz Thanks! I've tried to scale several prefabs to -1 by all axis in turn, but with no effect( Can you please give me the names of the prefabs that you tried to scale? And what Unity version do you use? This info would help a lot. Thank you.
    I'm still not getting the error( Going to try the latest Unity version now (I'm on 5.3.4 at the moment).

    UPDATE: Ok, I'm getting the error on Unity 5.4.0. Finally... I'll try to fix it now. Will keep you posted.
     
    Last edited: Aug 28, 2016
  10. Mana-Station

    Mana-Station

    Joined:
    Apr 27, 2015
    Posts:
    168
    Sorry for the delay, guys. I was able to fix the problem and uploading the fixed version right now.
    It seems like the error appears on Unity 5.4 only. If you were using an older version and updated Unity, please don't forget to update the asset too.

    The error disappears when you check "Read/Wright Enabled" in the import settings for the mesh collider. If you don't want to wait for the update and fix it right now, go to 'meshes > colliders' folder, select all, check "Read/Wright Enabled" and click apply. You'll also need to do this for 'Meshes > 1.1 > Stair_Bottom_Decor_03'.

    I've noticed some other errors too, they all will be fixed with the update.
    Thanks for your help and patience, guys! :)
     
  11. EoniteUnity

    EoniteUnity

    Joined:
    Sep 28, 2016
    Posts:
    3
    Quick way to reproduce: download "The Courtyard" demo and create a project with 5.4.1f1 on OS X, then try to run the scene.
     
  12. zakirshikhli

    zakirshikhli

    Joined:
    Apr 8, 2016
    Posts:
    19
    Exactly, Read-Write Enabled must be turn on for static meshes
     
  13. tnqiang

    tnqiang

    Joined:
    Jan 27, 2015
    Posts:
    3
    In my scene, the reason is that some MeshFilter has an empty Mesh attached.
     
  14. GregoryFenn

    GregoryFenn

    Joined:
    Feb 13, 2018
    Posts:
    43
    As a quick update, I'm using the semi-official Ubuntu 2018 beta build and I get this weird error with some packages, mainly the POLYGON-Western paid asset pack. I can fix it in two ways: by sniping-out the .fbx file that it is referring to and checking the box to make it read/writable, in the Model tab of Inspector, or by simply trying to play the game.

    The fact that playing/building the game fixes it suggests to me that the package has some settings whereby it will check the boxes on build, as a fail-safe in case they aren't checked by default.
     
  15. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    238
    Sorry, where is this "Read-Write Enabled" setting found?
     
    Felipefs likes this.
  16. JoJa15

    JoJa15

    Joined:
    Feb 11, 2017
    Posts:
    17
    @HeyBishop You can find that settings when you click on the model file in the project folder or asset view within unity . With the model file selected you will see it in the inspector view under the import settings for that model (make sure the model TAB is selected. I have included an image of what it looks like.
    import.png
     
  17. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    238
    MANY THANKS!
     
  18. Ebonicus

    Ebonicus

    Joined:
    Oct 31, 2016
    Posts:
    158
    Enabling read/write is not good for mobile, it requires two versions of the mesh data to be stored. I have read that this should not be done unless the mesh will be animated or deformed with animations.

    To clear this error, I make sure "import animations" is UNCHECKED on the animations tab, and keep read/write disabled in the model tab, if the mesh is a static object.

    If the object has animations, read/write should be true.
     
    io-games, Develax and HeyBishop like this.
  19. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    238
    Fascinating @Ebonicus! Thank you for sharing this tidbit. I'm authoring for mobile VR, so if I ever get struck with performance issues, I'll uncheck everything that doesn't need to be.
     
    Ebonicus likes this.
  20. pbrowne

    pbrowne

    Joined:
    Aug 27, 2018
    Posts:
    61
    This was the answer for me!
     
  21. stjernerlever

    stjernerlever

    Joined:
    Oct 25, 2015
    Posts:
    10
    Yep, me too
     
  22. stjernerlever

    stjernerlever

    Joined:
    Oct 25, 2015
    Posts:
    10
    This fixed it for me, thanks!
     
  23. Revisia

    Revisia

    Joined:
    Jun 7, 2019
    Posts:
    3
    Thanks Fixed the issue for me!
     
  24. bblakesley01

    bblakesley01

    Joined:
    May 11, 2018
    Posts:
    3
    This happens to me periodically in Unity 2019.3.0b1. Restarting Unity has fixed it so far.
     
  25. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    Happening here on 2019.2.9f1
    Checking read/write on the model stopped the error.
     
  26. Ryde_

    Ryde_

    Joined:
    Mar 13, 2017
    Posts:
    1
    Actually check the read/write then uncheck again then apply is working for me, and it's a cleaner way.
     
    mgear likes this.
  27. unity_LeDCjIKFpgeTrA

    unity_LeDCjIKFpgeTrA

    Joined:
    Oct 2, 2019
    Posts:
    2
    1. Restart Unity (My error was solved this way)
    2. Enable Read/Write of the Mesh prefab
     
  28. Fira-Soft

    Fira-Soft

    Joined:
    Sep 9, 2014
    Posts:
    26
    Guys, just to let you know, usually Enable Read/Write is NOT the way to go, unless you need it to be, as stated in :

    https://docs.unity3d.com/Manual/class-TextureImporter.html
    https://docs.unity3d.com/ScriptReference/Texture2D-isReadable.html
    https://docs.unity3d.com/ScriptReference/TextureImporter-isReadable.html

    This Mesh Collider error was issued on the tracker on:
    https://issuetracker.unity3d.com/is...nt-is-added-to-the-mesh-and-built-to-platform

    And states that the problem is fixed on Unity 2019.3.0 (Release Canditate 5, at the time of this post, as it can be found on the change log, by issue id 1159597)

    I tried it, and for new objects it's indeed working, but for my ongoing project, that was on unity 2019.2, before updating, it wasnt.

    So to fix it, besides updating to unity 2019.3.5, I also needed to remove the Mesh Collider from the object and re adding it.
     
    vama89, SamohtVII, stonstad and 2 others like this.
  29. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Ive just become aware that EVERY mesh in my project is set is isReadable. The docs day this will hold 2 copies in memory and waste memory. So I went an started writing a script to process them all to set isReadable to false... then I read in the docs "Scaling a mesh with different amounts along the three axes (i.e. non-uniform scaling) requires the mesh to be readable for correct lighting.". I would say a lot of my meshes are probably scaled non uniformly in the scene (eg 1,1,2), and I have a very big project... so does this mean setting them to isReadable will break the lighting on these objects? And therefore I should not fix objects that are not uniformly scaled. How would I check this, do I need to check the model scale in the project AND also the scaling of it in the scene? if theyre all uniform like 1,1,1 or 2,2,2 then im ok to set it to isReadable = false ?
     
  30. Fira-Soft

    Fira-Soft

    Joined:
    Sep 9, 2014
    Posts:
    26
    Are they scaled only on the scene, when placing them, or on run time, by script? As I understand it, you need both copies only on the second case, if I'm not mistaken.
     
  31. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    659

    Important
    -- before doing anything, read what Fira-Soft wrote above.
     
  32. Trend86

    Trend86

    Joined:
    Jul 25, 2019
    Posts:
    7
    What about 2D Sprites? I'm getting the same issue in my 2D game... any workarounds?
     
  33. grassdesign0

    grassdesign0

    Joined:
    Jun 7, 2020
    Posts:
    1
    I fixed it by resetting the mesh collider component of the mesh that is giving the error
     
    Lex4art likes this.