Skip to content
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 @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed path traced subsurface scattering for transmissive surfaces (case 1329403)
- Fixed missing context menu for “Post Anti-Aliasing” in Camera (1357283)
- Fixed error when disabling opaque objects on a camera with MSAA.
- Fixed double camera preview.

### Changed
- Visual Environment ambient mode is now Dynamic by default.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System;
using System.Reflection;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering.HighDefinition;
Expand All @@ -14,6 +16,9 @@ partial class HDCameraEditor : Editor
Camera[] m_PreviewCameras;
HDAdditionalCameraData[] m_PreviewAdditionalCameraDatas;

static readonly Type k_SceneViewCameraOverlay = Type.GetType("UnityEditor.SceneViewCameraOverlay,UnityEditor");
static readonly FieldInfo k_SceneViewCameraOverlay_ForceDisable = k_SceneViewCameraOverlay.GetField("forceDisable", BindingFlags.Static | BindingFlags.NonPublic);

void OnEnable()
{
m_SerializedCamera = new SerializedHDCamera(serializedObject);
Expand All @@ -30,6 +35,9 @@ void OnEnable()
// Say that we are a camera editor preview and not just a regular preview
m_PreviewAdditionalCameraDatas[i].isEditorCameraPreview = true;
}

// Disable builtin camera overlay
k_SceneViewCameraOverlay_ForceDisable.SetValue(null, true);
}

void OnDisable()
Expand All @@ -43,6 +51,9 @@ void OnDisable()
DestroyImmediate(m_PreviewCameras[i].gameObject);
m_PreviewCameras = null;
m_PreviewAdditionalCameraDatas = null;

// Restore builtin camera overlay
k_SceneViewCameraOverlay_ForceDisable.SetValue(null, false);
}

public override void OnInspectorGUI()
Expand Down