Remove "Mesh not found." exception #910
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
issue #909 のパッチです。
UniGLTF.gltfExporter.ExportNode
で、"Mesh not found." の例外をスローしている部分を、単に削除することで修正してみました。glTF.nodes
の mesh のインデックスが 0 未満のものは、UniGLTF.GltfSerializer:Serialize_gltf_nodes_ITEM
でメッシュの出力がスキップされますので、例外を投げずにそのまま続行すればよさそうだと考えました。もし、この修正方法がまずければ、適切に実装されてください。
glTF に出力したときの node のサンプル
TextMeshPro のオブジェクトや、マテリアルがないオブジェクトは、node は出力されますが、mesh のインデックスはありません。v0.72.0 と同様の状態になります。