Skip to content

Commit

Permalink
JIRA: ABC-279 Fix for 2.3.X: Build fails with empty AlembicStreamPlay…
Browse files Browse the repository at this point in the history
…er component (#488)

* JIRA: ABC-279 Fix for 2.3.X: Build fails with empty AlembicStreamPlayer component

Test

* Fix for the bug

* Changelog
  • Loading branch information
clusty authored Oct 5, 2021
1 parent 174908d commit 9fd74d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Binary file modified TestProjects/AlembicStandaloneBuild/Assets/Scene.unity
Binary file not shown.
1 change: 1 addition & 0 deletions com.unity.formats.alembic/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
### Changed
### Fixed
- Prevent build error when the Scene contains empty AlembicStreamPlayer components.

## [2.3.0-pre.2] - 2021-09-02
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProj

foreach (var files in FilesToCopy)
{
if (!File.Exists(files.Key))
{
continue;
}

var dir = Path.GetDirectoryName(files.Value);
if (dir != null && !Directory.Exists(dir))
{
Expand Down Expand Up @@ -95,6 +100,10 @@ static void ProcessAlembicStreamPlayerAssets(AlembicStreamPlayer streamPlayer, s
{
streamPlayer.StreamDescriptor = streamPlayer.StreamDescriptor.Clone();// make a copy
var srcPath = streamPlayer.StreamDescriptor.PathToAbc;
if (string.IsNullOrEmpty(srcPath))
{
return;
}

// Avoid name collisions by hashing the full path
var hashedFilename = HashSha1(srcPath) + ".abc";
Expand Down

0 comments on commit 9fd74d9

Please sign in to comment.