Skip to content

Commit

Permalink
Fixed an issue where a warning about the static sky not being ready w…
Browse files Browse the repository at this point in the history
…as wrongly displayed. (#2727)

* Fixed an issue where a warning about the static sky not being ready was wrongly displayed.

* Update changelog

* Remove log

* Update SkyManager.cs

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
  • Loading branch information
JulienIgnace-Unity and sebastienlagarde committed Nov 23, 2020
1 parent 6bbeef6 commit 4b1e36e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed normal buffer not bound to custom pass anymore.
- Fixed issues with camera management in the graphics compositor (cases 1292548, 1292549).
- Fixes some labels being clipped in the Render Graph Viewer
- Fixed an issue where a warning about the static sky not being ready was wrongly displayed.

### Changed
- Removed the material pass probe volumes evaluation mode.
Expand Down
Expand Up @@ -153,20 +153,12 @@ class SkyManager

// 2 by default: Static sky + one dynamic. Will grow if needed.
DynamicArray<CachedSkyContext> m_CachedSkyContexts = new DynamicArray<CachedSkyContext>(2);

public SkyManager()
{}

public SkyManager()
{
#if UNITY_EDITOR
UnityEditor.Lightmapping.bakeStarted += OnBakeStarted;
#endif
}

~SkyManager()
{
#if UNITY_EDITOR
UnityEditor.Lightmapping.bakeStarted -= OnBakeStarted;
#endif
}
~SkyManager()
{}

internal static SkySettings GetSkySetting(VolumeStack stack)
{
Expand Down Expand Up @@ -293,6 +285,10 @@ public void Build(HDRenderPipelineAsset hdAsset, RenderPipelineResources default
}

InitializeBlackCubemapArray();

#if UNITY_EDITOR
UnityEditor.Lightmapping.bakeStarted += OnBakeStarted;
#endif
}

void InitializeBlackCubemapArray()
Expand Down Expand Up @@ -338,6 +334,7 @@ public void Cleanup()

#if UNITY_EDITOR
CoreUtils.Destroy(m_DefaultPreviewSky);
UnityEditor.Lightmapping.bakeStarted -= OnBakeStarted;
#endif
}

Expand Down

0 comments on commit 4b1e36e

Please sign in to comment.