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 @@ -710,6 +710,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed Sorting Priority not displayed correctly in the DrawRenderers custom pass UI.
- Fixed glitch in Project settings window when selecting diffusion profiles in material section (case 1253090)
- Fixed issue with light layers bigger than 8 (and above the supported range).
- Fixed errors when switching area light to disk shape while an area emissive mesh was displayed.

### Changed
- Improve MIP selection for decals on Transparents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,10 @@ public void Update()
settings.Update();

lightGameObject.Update();
deportedAreaLightEmissiveMeshMotionVector?.serializedObject.Update();
deportedAreaLightEmissiveMeshLayer?.serializedObject.Update();
if (deportedAreaLightEmissiveMeshMotionVector.IsTargetAlive())
deportedAreaLightEmissiveMeshMotionVector?.serializedObject.Update();
if (deportedAreaLightEmissiveMeshLayer.IsTargetAlive())
deportedAreaLightEmissiveMeshLayer?.serializedObject.Update();
}

void ApplyInternal(bool withDeportedEmissiveMeshData)
Expand All @@ -482,8 +484,10 @@ void ApplyInternal(bool withDeportedEmissiveMeshData)
settings.ApplyModifiedProperties();
if (withDeportedEmissiveMeshData)
{
deportedAreaLightEmissiveMeshMotionVector?.serializedObject.ApplyModifiedProperties();
deportedAreaLightEmissiveMeshLayer?.serializedObject.ApplyModifiedProperties();
if (deportedAreaLightEmissiveMeshMotionVector.IsTargetAlive())
deportedAreaLightEmissiveMeshMotionVector?.serializedObject.ApplyModifiedProperties();
if (deportedAreaLightEmissiveMeshLayer.IsTargetAlive())
deportedAreaLightEmissiveMeshLayer?.serializedObject.ApplyModifiedProperties();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ public static IEnumerable<string> EnumerateDisplayName(this SerializedProperty p
yield return property.displayName;
}

public static bool IsTargetAlive(this SerializedProperty property)
=> property != null && property.serializedObject.targetObject != null &&
!property.serializedObject.targetObject.Equals(null);

/// <summary>
/// Helper to get an enum value from a SerializedProperty.
/// This handle case where index do not correspond to enum value.
Expand Down