Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

VisualEffect.releaseInstanceWhenDisabled

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 releaseInstanceWhenDisabled;

Description

This property allows the visual effect to release some buffers when the visual effect is disabled, potentially saving memory.

If the visual effect is using instancing, the batch will only be freed when all the instances have been removed. This means that setting this property to true and disabling the visual effect will not always result in memory being released. However, it will still allow other visual effects to use its place in the batch, potentially saving memory from being allocated. Enabling this option means that the instance will be created when the effect is enabled, which can require allocating at that moment, rather than at creation.