Version: 2021.2
LanguageEnglish
  • C#

DynamicGI.UpdateEnvironment

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void UpdateEnvironment();

Description

Schedules an update of the environment cubemap.

An update of the environment cubemap is scheduled.
If the system supports asynchronous readbacks (this can be queried with SystemInfo.supportsAsyncGPUReadback), the environment cubemap is read back without blocking while waiting for the result, but may lag one or more frames behind. The amount of environment readbacks which can be scheduled is limited. If you schedule updates faster than the readback can be performed an overflow will occur with a console warning.
If the system does not support asynchronous readbacks, the environment cubemap readback will stall the current thread, reading and processing each face of the cubemap one by one. An alternative to updating the environment cubemap for dynamic global illumination through readbacks is to manually set the contents with DynamicGI.SetEnvironmentData.