diff --git a/.gitattributes b/.gitattributes index 05481a1b526..be367c8dc85 100644 --- a/.gitattributes +++ b/.gitattributes @@ -375,6 +375,12 @@ Editor/Resources/unity[[:space:]]editor[[:space:]]resources filter=lfs diff=lfs # memoryprofiler test snapshots **/com.unity.memoryprofiler.tests/**/*.[sS][nN][aA][pP] filter=lfs diff=lfs merge=lfs -text - # buginfo tools /Tools/Unity.BugInfo.Coverage/bin/* filter=lfs diff=lfs merge=lfs -text + +#SRP Templates +/Templates/**/LightingData.asset binary +/Templates/**/*.[pP][nN][gG] filter=lfs diff=lfs merge=lfs -text +/Templates/**/*.[tT][gG][aA] filter=lfs diff=lfs merge=lfs -text +/Templates/**/*.[tT][iI][fF] filter=lfs diff=lfs merge=lfs -text +/Templates/**/*.[fF][bB][xX] filter=lfs diff=lfs merge=lfs -text diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/Images/videos/light-anchor-animation.mp4 b/Packages/com.unity.render-pipelines.core/Documentation~/Images/videos/light-anchor-animation.mp4 index 1b7784f1e57..053921f77c8 100644 Binary files a/Packages/com.unity.render-pipelines.core/Documentation~/Images/videos/light-anchor-animation.mp4 and b/Packages/com.unity.render-pipelines.core/Documentation~/Images/videos/light-anchor-animation.mp4 differ diff --git a/Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs b/Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs index 20902c6fecb..aa7b4fab4fc 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs @@ -451,7 +451,7 @@ void IEnvironmentDisplayer.Repaint() void OnFocus() { //OnFocus is called before OnEnable that open backend if not already opened, so only sync if backend is open - if (LookDev.open) + if (LookDev.open && LookDev.currentContext != null) { //If EnvironmentLibrary asset as been edited by the user (deletion), //update all view to use null environment if it was not temporary ones diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/screenspacelensflares-threshold.mp4 b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/screenspacelensflares-threshold.mp4 index c7fc8aa8af4..fa7b840a86e 100644 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/screenspacelensflares-threshold.mp4 and b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/screenspacelensflares-threshold.mp4 differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/LookDevVolumeProfileSettingsPropertyDrawer.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/LookDevVolumeProfileSettingsPropertyDrawer.cs index 99cc74a5039..c34c90ca68b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/LookDevVolumeProfileSettingsPropertyDrawer.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/LookDevVolumeProfileSettingsPropertyDrawer.cs @@ -13,6 +13,7 @@ class LookDevVolumeProfileSettingsPropertyDrawer : PropertyDrawer { VisualElement m_Root; Editor m_LookDevVolumeProfileEditor; + int m_LookDevVolumeProfileHash = -1; SerializedObject m_SettingsSerializedObject; SerializedProperty m_VolumeProfileSerializedProperty; EditorPrefBool m_DefaultVolumeProfileFoldoutExpanded; @@ -51,6 +52,14 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property) Editor GetLookDevDefaultVolumeProfileEditor(VolumeProfile lookDevAsset) { + int currentHash = (lookDevAsset != null) ? lookDevAsset.GetHashCode() : -1; + if (currentHash != m_LookDevVolumeProfileHash) + { + Editor.DestroyImmediate(m_LookDevVolumeProfileEditor); + m_LookDevVolumeProfileEditor = null; + m_LookDevVolumeProfileHash = currentHash; + } + Editor.CreateCachedEditor(lookDevAsset, typeof(VolumeProfileEditor), ref m_LookDevVolumeProfileEditor); return m_LookDevVolumeProfileEditor; } @@ -68,8 +77,12 @@ VisualElement CreateAssetFieldUI() { tooltip = k_LookDevVolumeProfileAssetLabel.tooltip, objectType = typeof(VolumeProfile), - value = m_VolumeProfileSerializedProperty.objectReferenceValue as VolumeProfile, + style = + { + flexShrink = 1, + } }; + field.BindProperty(m_VolumeProfileSerializedProperty); field.AddToClassList("unity-base-field__aligned"); //Align with other BaseField field.Q