Version: 2021.1
LanguageEnglish
  • C#

ParticleSystem.ResetPreMappedBufferMemory

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

Switch to Manual

Declaration

public static void ResetPreMappedBufferMemory();

Description

Reset the cache of reserved graphics memory used for efficient rendering of Particle Systems.

In order to efficiently write its data into graphics memory, the Particle System uses a pool of pre-allocated vertex buffers. When rendering a large number of particles, this pool will increase in size, and then maintain this size even when rendering fewer particles afterwards.

Maintaining a large pool can make future rendering more efficient, in situations where a large number of particles are being rendered, and the pool is already pre-sized appropriately. However, a large pool uses more memory, so this function allows that memory to be released.

This method is most useful when you know that you have finished rendering a high number of particles, and will not need to render a similar amount in the near future, i.e. when transitioning from a scene containing a large number of particles, to one where fewer particles will be rendered.

Modern graphics APIs, such as DirectX12, Vulkan and Metal, do not use a pre-allocated pool of vertex buffers, because they can operate efficiently without it. This method does nothing on these devices.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961