Skip to content

Commit

Permalink
fix GLB export
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Dec 17, 2019
1 parent fe0e11c commit 4ceaffd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions UnityGLTF/Assets/UnityGLTF/Runtime/Scripts/GLTFSceneExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ public void SaveGLBToStream(Stream stream, string sceneName)
TextWriter jsonWriter = new StreamWriter(jsonStream, Encoding.ASCII);

_root.Scene = ExportScene(sceneName, _rootTransforms);
if (_exportAnimation)
{
exportAnimation();
// Export skins
for (int i = 0; i < _skinnedNodes.Count; ++i)
{
Transform t = _skinnedNodes[i];
exportSkinFromNode(t);
}
}

_buffer.ByteLength = CalculateAlignment((uint)_bufferWriter.BaseStream.Length, 4);

Expand Down

0 comments on commit 4ceaffd

Please sign in to comment.