Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pooled particle count
#2
(09-07-2019, 03:10 AM)chipmeisterc Wrote: Hi there,
I am currently experimenting with runtime length modification (working great!)

However I don't yet know what the optimum number of pooled particles is. Setting to 1000 was more than enough, however I noticed that upon trying to reduce the count that the editor value does not seem to be used but rather the value that was cached upon initial initialization.

Re-initializing solves the problem, however, in doing so my handles (created via the editor) no longer function, requiring them to be re-created.

Is the pooled particle count not updating a bug? If not, is it necessary to re-init or am I missing some workflow steps? / Generally doing things wrong?

Thanks,
Chris

Hi,

The particle pool, as the name implies, is allocated once at initialization time. After the rope has been initialized, the pool size cannot be changed except by re-initialization. You're supposed to create a pool big enough to cover your rope's maximum possible length, so that no particle allocation takes place at runtime.

Allocating/deallocating resources at runtime is a big no-no and should be avoided in Unity when possible, that's why a pool is used Sonrisa
Reply


Messages In This Thread
Pooled particle count - by chipmeisterc - 09-07-2019, 03:10 AM
RE: Pooled particle count - by josemendez - 09-07-2019, 10:46 AM
RE: Pooled particle count - by chipmeisterc - 09-07-2019, 06:33 PM
RE: Pooled particle count - by josemendez - 09-07-2019, 07:20 PM