Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.21.22] - 2024-02-08
- Fixed a bug where calculating scene dependency data could throw an error
- Fixed a bug that lead to builds being much slower than they should be
- Fixed issue where "Build Task CalculateSceneDependencyData failed with exception: Object reference not set to an instance of an object" is thrown when building.
  • Loading branch information
Unity Technologies committed Feb 8, 2024
1 parent 7485905 commit 2c7db0f
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.21.22] - 2024-02-08
- Fixed a bug where calculating scene dependency data could throw an error
- Fixed a bug that lead to builds being much slower than they should be
- Fixed issue where "Build Task CalculateSceneDependencyData failed with exception: Object reference not set to an instance of an object" is thrown when building.

## [1.21.21] - 2023-10-17
- Fix CalculateSceneDependencyData given changed sprite atlas

Expand Down
4 changes: 4 additions & 0 deletions Editor/ContentPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ internal static bool CanBuildPlayer(BuildTarget target, BuildTargetGroup targetG
#if UNITY_2021_3_OR_NEWER
private static IBuildWindowExtension GetBuildWindowExtension(BuildTarget target, BuildTargetGroup targetGroup)
{
#if UNITY_2023_3_OR_NEWER
var module = ModuleManager.GetTargetStringFrom(target);
#else
var module = ModuleManager.GetTargetStringFrom(targetGroup, target);
#endif
return ModuleManager.GetBuildWindowExtension(module);
}

Expand Down
3 changes: 2 additions & 1 deletion Editor/Tasks/CalculateSceneDependencyData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ public ReturnCode Run()
if (Enumerable.SequenceEqual(filteredReferences,filteredReferencesNew) == false)
{
useCachedScene = false;
break;
}
// ADDR-3596: break must be here to prevent CalculatePlayerDependenciesForScene from being called unnecessarily.
break;
}
}

Expand Down
3 changes: 3 additions & 0 deletions Editor/Utilities/BuildCacheUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public static CacheEntry GetCacheEntry(string path, int version = 1)

public static CacheEntry GetCacheEntry(Type type, int version = 1)
{
if (type == null)
return new CacheEntry { Version = version };

CacheEntry entry;
KeyValuePair<Type, int> key = new KeyValuePair<Type, int>(type, version);
if (m_TypeToHash.TryGetValue(key, out entry))
Expand Down
3 changes: 3 additions & 0 deletions Tests/Editor/OptionalPackages.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Tests/Editor/OptionalPackages/PlaceholderTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using NUnit.Framework;

namespace UnityEditor.Build.Pipeline.Editor.OptionalPackages.Tests
{
public class PlaceholderTests
{
[Test]
public void Test_Placeholder()
{
// this can be removed if optional package tests are added, the utr used by
// upm-ci doesn't currently seem to have a way to allow zero tests
Assert.IsTrue(true);
}
}
}
3 changes: 3 additions & 0 deletions Tests/Editor/OptionalPackages/PlaceholderTests.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ValidationExceptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"ValidationTest": "API Validation",
"ExceptionError": "",
"PackageVersion": "1.21.21"
"PackageVersion": "1.21.22"
}
]
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.scriptablebuildpipeline",
"displayName": "Scriptable Build Pipeline",
"version": "1.21.21",
"version": "1.21.22",
"unity": "2019.4",
"description": "The Scriptable Build Pipeline moves the asset bundle build pipeline to C#. Use the pre-defined build flows, or create your own using the divided up APIs. This system improves build time, fixes incremental build, and provides greater flexibility.",
"keywords": [
Expand All @@ -14,15 +14,15 @@
],
"dependencies": {},
"_upm": {
"changelog": "- Fix CalculateSceneDependencyData given changed sprite atlas"
"changelog": "- Fixed a bug where calculating scene dependency data could throw an error\n- Fixed a bug that lead to builds being much slower than they should be\n- Fixed issue where \"Build Task CalculateSceneDependencyData failed with exception: Object reference not set to an instance of an object\" is thrown when building."
},
"upmCi": {
"footprint": "fcf0e109f286090efa0e05ca2ab469c8097c1f41"
"footprint": "04e9000332727dad441919b78ff684437b3fb0a2"
},
"documentationUrl": "https://docs.unity3d.com/Packages/[email protected]/manual/index.html",
"repository": {
"url": "https://github.cds.internal.unity3d.com/unity/Addressables.git",
"type": "git",
"revision": "a981d4bc6c5de7a6a62ec3f63f3bdfc87ece371a"
"revision": "6bd4bdae79fcdd3902dce37b766b3fae82d62fde"
}
}

0 comments on commit 2c7db0f

Please sign in to comment.