-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Describe the bug
ArgumentOutOfRangeException when export model(GltfWriter.cs)
ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: stream out of bounds, should be below 0 but was 0
at UnityEngine.Mesh+MeshData.GetVertexData[T] (System.Int32 stream) [0x00038] in <6c435a1487b44af8a1e8ac5a6d175b15>:0
at GLTFast.Export.MeshDataProxy`1[TIndex].GetVertexData (System.Int32 stream) [0x00000] in <24458e2b5ca44187bdccd3093e29063c>:0
at GLTFast.Export.GltfWriter.BakeMesh (System.Int32 meshId, GLTFast.Export.IMeshData meshData) [0x0073e] in <24458e2b5ca44187bdccd3093e29063c>:0
at GLTFast.Export.GltfWriter.BakeMeshes () [0x00295] in <24458e2b5ca44187bdccd3093e29063c>:0
at GLTFast.Export.GltfWriter.Bake (System.String bufferPath, System.String directory) [0x00082] in <24458e2b5ca44187bdccd3093e29063c>:0
at GLTFast.Export.GltfWriter.SaveAndDispose (System.IO.Stream outStream, System.String bufferPath, System.String directory) [0x000b5] in <24458e2b5ca44187bdccd3093e29063c>:0
at GLTFast.Export.GltfWriter.SaveToFileAndDispose (System.String path) [0x000f8] in <24458e2b5ca44187bdccd3093e29063c>:0
at GLTFast.Export.GameObjectExport.SaveToFileAndDispose (System.String path, System.Threading.CancellationToken cancellationToken) [0x00073] in <24458e2b5ca44187bdccd3093e29063c>:0
at GltfastExporter.ExportToGlbAsync (UnityEngine.GameObject go, System.String fileName, System.Boolean enableCompression) [0x0013f] in <86d77238c4df4c7cb81ccf02385747ed>:0
at Tsl.ModelStudio.Managers.ExportManager.ExportSpaceToGlbAsync (Tsl.ModelStudio.LivingSpace space, System.String fileName, System.Boolean enableCompression) [0x001c7] in :0
at Tsl.ModelStudio.Managers.ExportManager.PublishSpaceAsync (System.String targetFolder, Tsl.ModelStudio.LivingSpace space, System.Boolean recursive, System.Boolean hideModels) [0x009aa] in :0
at Tsl.ModelStudio.Editors.PublishAllSubSpacesCommand.Invoke () [0x000b6] in :0
Files
To Reproduce
Steps to reproduce the behavior:
1.Export the scene model during runtime.
2.An exception is thrown intermittently.
** Fix**
I have fixed this issue in the following files, with changes made at line 1164 and lines 1240-1249.
Desktop (please complete the following information):
- glTFast version [6.14.1]
- Unity Editor version [2022.3.41f1c1]
- Render Pipeline and version [Universal Render Pipeline 14.0.11]
- Platform: [Editor, Windows Player]