Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make the generated mesh readable ?
#1
Hi !

I wrote a  mesh deformer script which is modifying mesh vertices at runtime.
It was working great with another plugin "m*ga shap*s" : https://vimeo.com/278707282
But I decided to switch to Curvy for better features. The only issue I have is that the generated mesh is not readable :

"Not allowed to  access vertices on mesh 'Combined Mesh (root: scene) Instance' (isReadable is false; Read/Write must be enabled in import settings)
UnityEngine.Mesh:get_vertices()"

I tried to use mesh.UploadMeshData(false) inside the "CreateMesh" script, checking/unchecking the "combine" option, generate the .mesh asset, but it makes no difference. 
Do you have any idea about where and which code can I edit to make the generated mesh readable at runtime ?

Thank you so much for your support !

Regards,
Anthony
Reply
#2
Hi,
I am right now on vacation, with no access to a computer, so I can't provide you with a tested solution.
In this page https://docs.unity3d.com/ScriptReference/Mesh-isReadable.html, it is said that "A dynamic Mesh created from script always returns true". This makes me ask "Are you using the dynamically generated mesh?". If your answer is Yes, then try generate a .mesh asset, and use it after setting its "Read/Write Enabled" in its inspector.
I hope this helps. Please let me know if you still have the issue, while precising the Unity and Curvy versions.
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
It works ! for some reason the "static" checkbox was checked and this why the mesh was not readable...
Thank you for your great help !
regards
Reply
#4
You are welcome. Have a nice day.
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to make the face at the end of mesh? Chanon 3 6 11-14-2024, 04:38 PM
Last Post: _Aka_
  Mesh deform - baby guide jmh1804 7 11 08-22-2024, 07:18 AM
Last Post: _Aka_
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 10 22 04-17-2024, 10:57 AM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 4 03-26-2024, 01:12 PM
Last Post: _Aka_

Forum Jump: