Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixes some labels being clipped in the Render Graph Viewer
- Fixed issue when decal projector material is none.
- Fixed the sampling of the normal buffer in the the forward transparent pass.
- Fixed NullReferenceException when loading multipel scene async

## [10.2.0] - 2020-10-19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,16 @@ public void ClearCamerasUnusedFor(int frameWindow, int frameCount)
m_Cache.Keys.CopyTo(cameraKeysCache, 0);
foreach (var key in cameraKeysCache)
{
m_Cache.TryGetValue(key, out var value);
if ((frameCount - value.lastFrame) > frameWindow)
if (m_Cache.TryGetValue(key, out var value))
{
CoreUtils.Destroy(value.camera.gameObject);
m_Cache.Remove(key);
if ((frameCount - value.lastFrame) > frameWindow)
{
if (value.camera != null)
{
CoreUtils.Destroy(value.camera.gameObject);
}
m_Cache.Remove(key);
}
}
}
}
Expand All @@ -79,7 +84,10 @@ public void Clear()
throw new ObjectDisposedException(nameof(CameraCache<K>));

foreach (var pair in m_Cache)
CoreUtils.Destroy(pair.Value.camera.gameObject);
{
if (pair.Value.camera != null)
CoreUtils.Destroy(pair.Value.camera.gameObject);
}
m_Cache.Clear();
}

Expand Down