ドキュメント

Unity Engine

Unity Engine

releaseInstanceWhenDisabled

This property allows the visual effect to release some buffers when the visual effect is disabled, potentially saving memory.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine.VFX
  • Assembly: UnityEngine.VFXModule
public bool releaseInstanceWhenDisabled { get; set; }

Remarks

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.