// We need one frame delay for this update to work since DynamicGI.UpdateEnvironment is executed direclty but the renderloop is not (so we need to wait for the sky texture to be rendered first)
if(m_NeedLowLevelUpdateEnvironment)
{
// TODO: Properly send the cubemap to Enlighten. Currently workaround is to set the cubemap in a Skybox/cubemap material
RenderSettings.skybox=m_StandardSkyboxMaterial;// Setup this material as the default to be use in RenderSettings
RenderSettings.ambientIntensity=1.0f;// fix this to 1, this parameter should not exist!
RenderSettings.ambientMode=UnityEngine.Rendering.AmbientMode.Skybox;// Force skybox for our HDRI
RenderSettings.reflectionIntensity=1.0f;
RenderSettings.customReflection=null;
DynamicGI.UpdateEnvironment();
m_NeedLowLevelUpdateEnvironment=false;
}
if(IsSkyValid())
{
m_CurrentUpdateTime+=Time.deltaTime;
// We need one frame delay for this update to work since DynamicGI.UpdateEnvironment is executed direclty but the renderloop is not (so we need to wait for the sky texture to be rendered first)
if(m_NeedLowLevelUpdateEnvironment)
{
// TODO: Properly send the cubemap to Enlighten. Currently workaround is to set the cubemap in a Skybox/cubemap material