Skip to content

[Backport 8.x.x] Hdrp/public static sky #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed
- Shadowmask and realtime reflection probe property are hide in Quality settings
- Made the StaticLightingSky class public so that users can change it by script for baking purpose.

## [8.1.0] - 2020-04-21

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

namespace UnityEngine.Rendering.HighDefinition
{
/// <summary>
/// Class controlling which sky is used for static and baked lighting.
/// </summary>
[HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "Static-Lighting-Sky" + Documentation.endURL)]
[ExecuteAlways]
[AddComponentMenu("")] // Hide this object from the Add Component menu
class StaticLightingSky : MonoBehaviour
public class StaticLightingSky : MonoBehaviour
{
[SerializeField]
VolumeProfile m_Profile;
Expand All @@ -16,12 +19,10 @@ class StaticLightingSky : MonoBehaviour
int m_LastComputedHash;
bool m_NeedUpdateStaticLightingSky;

[NonSerialized]
public SkySettings m_SkySettings; // This one contain only property values from overridden properties in the original profile component
[NonSerialized]
public SkySettings m_SkySettingsFromProfile;
SkySettings m_SkySettings; // This one contain only property values from overridden properties in the original profile component
SkySettings m_SkySettingsFromProfile;

public SkySettings skySettings
internal SkySettings skySettings
{
get
{
Expand All @@ -42,7 +43,9 @@ public SkySettings skySettings

List<SkySettings> m_VolumeSkyList = new List<SkySettings>();


/// <summary>
/// Volume profile where the sky settings used for static lighting will be fetched.
/// </summary>
public VolumeProfile profile
{
get
Expand All @@ -69,6 +72,10 @@ public VolumeProfile profile
}
}

/// <summary>
/// Unique ID of the sky used for static lighting.
/// The unique ID should be for a sky that is present in the profile. See SkySettings.GetUniqueID to get the ID per sky type.
/// </summary>
public int staticLightingSkyUniqueID
{
get
Expand Down