question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export non-readable meshes at runtime

See original GitHub issue

Meshes 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:open
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andreasherbigcommented, Dec 9, 2022

I’ll see if I can spare the time 😃 Will keep you posted.

1reaction
andreasherbigcommented, Dec 9, 2022

Just stumbled upon this exact issue. Would be great if the different approach worked…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found