File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
com.unity.render-pipelines.high-definition Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
151151- Force to rebake probe with missing baked texture. (1253367)
152152- Fix issue causing blocky artifacts when decals affect metallic and are applied on material with specular color workflow.
153153- Appropriately constraint blend distance of reflection probe while editing with the inspector (case 1248931)
154+ - Fixed errors when switching area light to disk shape while an area emissive mesh was displayed.
154155
155156### Changed
156157- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history.
Original file line number Diff line number Diff line change @@ -464,8 +464,10 @@ public void Update()
464464 settings . Update ( ) ;
465465
466466 lightGameObject . Update ( ) ;
467- deportedAreaLightEmissiveMeshMotionVector ? . serializedObject . Update ( ) ;
468- deportedAreaLightEmissiveMeshLayer ? . serializedObject . Update ( ) ;
467+ if ( deportedAreaLightEmissiveMeshMotionVector . IsTargetAlive ( ) )
468+ deportedAreaLightEmissiveMeshMotionVector ? . serializedObject . Update ( ) ;
469+ if ( deportedAreaLightEmissiveMeshLayer . IsTargetAlive ( ) )
470+ deportedAreaLightEmissiveMeshLayer ? . serializedObject . Update ( ) ;
469471 }
470472
471473 void ApplyInternal ( bool withDeportedEmissiveMeshData )
@@ -474,8 +476,10 @@ void ApplyInternal(bool withDeportedEmissiveMeshData)
474476 settings . ApplyModifiedProperties ( ) ;
475477 if ( withDeportedEmissiveMeshData )
476478 {
477- deportedAreaLightEmissiveMeshMotionVector ? . serializedObject . ApplyModifiedProperties ( ) ;
478- deportedAreaLightEmissiveMeshLayer ? . serializedObject . ApplyModifiedProperties ( ) ;
479+ if ( deportedAreaLightEmissiveMeshMotionVector . IsTargetAlive ( ) )
480+ deportedAreaLightEmissiveMeshMotionVector ? . serializedObject . ApplyModifiedProperties ( ) ;
481+ if ( deportedAreaLightEmissiveMeshLayer . IsTargetAlive ( ) )
482+ deportedAreaLightEmissiveMeshLayer ? . serializedObject . ApplyModifiedProperties ( ) ;
479483 }
480484 }
481485
Original file line number Diff line number Diff line change @@ -287,6 +287,10 @@ public static IEnumerable<string> EnumerateDisplayName(this SerializedProperty p
287287 yield return property . displayName ;
288288 }
289289
290+ public static bool IsTargetAlive ( this SerializedProperty property )
291+ => property != null && property . serializedObject . targetObject != null &&
292+ ! property . serializedObject . targetObject . Equals ( null ) ;
293+
290294 /// <summary>
291295 /// Helper to get an enum value from a SerializedProperty.
292296 /// This handle case where index do not correspond to enum value.
You can’t perform that action at this time.
0 commit comments