Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

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 var freeUnusedRenderingResources: bool;
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.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答