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
  • Loading branch information
JulienIgnace-Unity authored and sebastienlagarde committed Nov 24, 2020
1 parent 02a8679 commit 9839416
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 @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed missing alpha blend state properties in Axf shader and update default stencil properties
- Fixed normal buffer not bound to custom pass anymore.
- Fixed issues with camera management in the graphics compositor (cases 1292548, 1292549).
- 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 @@ -339,6 +335,7 @@ public void Cleanup()

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

Expand Down

0 comments on commit 9839416

Please sign in to comment.