Skip to content

Commit

Permalink
snap from p4 fixes leak in headless
Browse files Browse the repository at this point in the history
  • Loading branch information
pandr committed Oct 18, 2018
1 parent 00df355 commit af8841d
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Assets/Scripts/Game/Main/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,20 +501,22 @@ public void Update()
{
hdpipe.DebugLayer2DCallback = DebugOverlay.Render;
hdpipe.DebugLayer3DCallback = DebugOverlay.Render3D;

var layer = LayerMask.NameToLayer("PostProcess Volumes");
if (layer == -1)
GameDebug.LogWarning("Unable to find layer mask for camera fader");
else
{
m_Exposure = ScriptableObject.CreateInstance<AutoExposure>();
m_Exposure.active = false;
m_Exposure.enabled.Override(true);
m_Exposure.keyValue.Override(0);
m_ExposureVolume = PostProcessManager.instance.QuickVolume(layer, 100.0f, m_Exposure);
}

pipeSetup = true;
}

var layer = LayerMask.NameToLayer("PostProcess Volumes");
if (layer == -1)
GameDebug.LogWarning("Unable to find layer mask for camera fader");
else
{
m_Exposure = ScriptableObject.CreateInstance<AutoExposure>();
m_Exposure.active = false;
m_Exposure.enabled.Override(true);
m_Exposure.keyValue.Override(0);
m_ExposureVolume = PostProcessManager.instance.QuickVolume(layer, 100.0f, m_Exposure);
}
}
if(m_ExposureReleaseCount > 0)
{
Expand Down

0 comments on commit af8841d

Please sign in to comment.