Skip to content

Commit

Permalink
fix: Error when animation package is not enabled (fixes #267)
Browse files Browse the repository at this point in the history
  • Loading branch information
atteneder committed Nov 1, 2021
1 parent a58d587 commit 2cc9444
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] -
### Fixed
- Error when animation package is not enabled (#267)

## [4.4.4] - 2021-10-28
### Fixed
- Build compiler error about missing variable (#265)
Expand Down
4 changes: 3 additions & 1 deletion Runtime/Scripts/Schema/Root.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,16 @@ public void GltfSerialize(StreamWriter stream) {
writer.AddArrayProperty("extensionsUsed", extensionsUsed);
}

#if UNITY_ANIMATION
if (animations!=null) {
writer.AddArray("animations");
foreach( var animation in animations) {
animation.GltfSerialize(writer);
}
writer.CloseArray();
}

#endif

if (buffers!=null) {
writer.AddArray("buffers");
foreach( var buffer in buffers) {
Expand Down

0 comments on commit 2cc9444

Please sign in to comment.