Permalink
Browse files

added: wait for 1 sec before capturing the probe to make sure that ev…

…erything is initialized (e.g. lightmaps)
  • Loading branch information...
larsbertram69 committed Jan 15, 2015
1 parent 462d9fa commit 7aa41882c1964bbbfb28c4601875a551a93a560b
Showing with 3 additions and 1 deletion.
  1. +3 −1 Lux Scripts/Lux Cubemapper/Scripts/LuxEnvProbe.cs
@@ -409,6 +409,8 @@ IEnumerator RenderCubeFaces(Cubemap cube, bool irradiance)
}
cube = new Cubemap((int)size, texFor, mipmap);
// make sure everything is up an running before capturing the probe
yield return new WaitForSeconds(1);
yield return StartCoroutine(Capture(cube, CubemapFace.PositiveZ, CubeCamera));
yield return StartCoroutine(Capture(cube, CubemapFace.PositiveX, CubeCamera));
yield return StartCoroutine(Capture(cube, CubemapFace.NegativeX, CubeCamera));
@@ -578,4 +580,4 @@ public void RetrieveCubemaps()
}
}
#endif
}
}

0 comments on commit 7aa4188

Please sign in to comment.