Version: 2020.3
LanguageEnglish
  • C#

Terrain.freeUnusedRenderingResources

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

public bool freeUnusedRenderingResources;

Description

Whether some per-camera rendering resources for the terrain should be freed after not being used for some frames.

By default this property is true, meaning these rendering resources will be deleted from memory if the camera they are associated with has not rendered for 100 frames. Sometimes this behavior might not be desired, because the next time these resources are required (when the camera starts to render again), we have to reallocate them, which can cause performance hiccup. In that case set this property to false to keep those resources in memory unless the camera they are associated with is destroyed.

The value is not serialized with Terrain component.