浏览代码

Merge pull request #844 from Unity-Technologies/fix/PreviewDebugFrameSettings

[HDCameraEditor] Fixed frame settings debug for camera preview
/main
GitHub 7 年前
当前提交
5b4c84ab
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 9
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraEditor.Handlers.cs

9
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraEditor.Handlers.cs


{
m_PreviewCamera.CopyFrom(c);
EditorUtility.CopySerialized(c, m_PreviewCamera);
EditorUtility.CopySerialized(c.GetComponent<HDAdditionalCameraData>(), m_PreviewAdditionalCameraData);
var cameraData = c.GetComponent<HDAdditionalCameraData>();
EditorUtility.CopySerialized(cameraData, m_PreviewAdditionalCameraData);
// We need to call UpdateDirtyFrameSettings to update the dirty flags that was set in the CopySerialized call
m_PreviewAdditionalCameraData.UpdateDirtyFrameSettings(true, cameraData.GetFrameSettings());
// And then to copy the runtime frame settings
// So this includes the runtime frame settings properly
cameraData.GetFrameSettings().CopyTo(m_PreviewAdditionalCameraData.GetFrameSettings());
m_PreviewHDCamera.Update(m_PreviewPostProcessLayer, m_PreviewAdditionalCameraData.GetFrameSettings());
var previewTexture = GetPreviewTextureWithSize((int)previewSize.x, (int)previewSize.y);

正在加载...
取消
保存