Skip to content

Commit 8802cec

Browse files
FrancescoC-unitysebastienlagarde
authored andcommitted
Fix for LookDev displaying probes as pink spheres #1521
1 parent 6d2abfd commit 8802cec

File tree

2 files changed

+17
-4
lines changed
  • com.unity.render-pipelines.core/Editor/LookDev
  • com.unity.render-pipelines.high-definition

2 files changed

+17
-4
lines changed

com.unity.render-pipelines.core/Editor/LookDev/Stage.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,28 @@ void SetGameObjectVisible(bool visible)
217217
if (go == null || go.Equals(null))
218218
continue;
219219
foreach (UnityEngine.Renderer renderer in go.GetComponentsInChildren<UnityEngine.Renderer>())
220-
renderer.enabled = visible;
220+
{
221+
if((renderer.hideFlags & HideFlags.HideInInspector) == 0 && ((renderer.hideFlags & HideFlags.HideAndDontSave) == 0))
222+
renderer.enabled = visible;
223+
}
221224
foreach (Light light in go.GetComponentsInChildren<Light>())
222-
light.enabled = visible;
225+
{
226+
if ((light.hideFlags & HideFlags.HideInInspector) == 0 && ((light.hideFlags & HideFlags.HideAndDontSave) == 0))
227+
light.enabled = visible;
228+
}
223229
}
224230

225231
// in case we add camera frontal light and such
226232
foreach (UnityEngine.Renderer renderer in m_Camera.GetComponentsInChildren<UnityEngine.Renderer>())
227-
renderer.enabled = visible;
233+
{
234+
if ((renderer.hideFlags & HideFlags.HideInInspector) == 0 && ((renderer.hideFlags & HideFlags.HideAndDontSave) == 0))
235+
renderer.enabled = visible;
236+
}
228237
foreach (Light light in m_Camera.GetComponentsInChildren<Light>())
229-
light.enabled = visible;
238+
{
239+
if ((light.hideFlags & HideFlags.HideInInspector) == 0 && ((light.hideFlags & HideFlags.HideAndDontSave) == 0))
240+
light.enabled = visible;
241+
}
230242
}
231243

232244
public void OnBeginRendering(IDataProvider dataProvider)

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1818
- Fixed issue with dynamic resolution handler when no OnResolutionChange callback is specified.
1919
- Fixed error about layers when disabling emissive mesh for area lights.
2020
- Fixed issue with sun icon being clipped in the look dev window.
21+
- Fixed lookdev toggling renderers that are set to non editable or are hidden in the inspector.
2122

2223
### Changed
2324
- Remove MSAA debug mode when renderpipeline asset has no MSAA

0 commit comments

Comments
 (0)