Export non-readable meshes at runtime
See original GitHub issueMeshes that are not marked as readable cannot be exported at the moment (was reported, did not try myself)
The native buffers could be read nonetheless, but with a different API:
See Rendering.AsyncGPUReadback.RequestIntoNativeArray
Sample code:
var requestVertexBuf = AsyncGPUReadback.Request(mesh.sharedMesh.GetVertexBuffer(0));
var requestIndexBuf = AsyncGPUReadback.Request(mesh.sharedMesh.GetIndexBuffer());
requestVertexBuf.WaitForCompletion();
requestIndexBuf.WaitForCompletion();
var nativeVertices = requestVertexBuf.GetData<Vector3>();
var nativeIndices = requestIndexBuf.GetData<ushort>();
We got to investigate if this works and implement it properly.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Reading meshes at runtime that are not enabled for ...
I have a problem that I want to read meshes to export parts of a scene at runtime. But many models are imported...
Read more >Import and Export runtime created static meshes using ...
Hi, I've imported an fbx generated in another application using RuntimeMeshimportExport. This file imports into Blender just fine but when ...
Read more >Can generated mesh be enabled to read/write?
I'm using an asset that needs mesh to be set to read/write for the vehicles to work properly. To make this work, I...
Read more >Convert mesh to stl/obj/fbx in runtime [closed]
I am looking for a way to export a mesh into stl/obj/fbx format at runtime and save it on local files of an...
Read more >Any way to Export a Mesh in Unity to a draco-file ? #450
But currently I do not know of a way to export a draco file from a Unity Mesh. Is there a sample of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll see if I can spare the time 😃 Will keep you posted.
Just stumbled upon this exact issue. Would be great if the different approach worked…