Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Defined a pooled particles from a given length
#5
(09-02-2022, 11:35 AM)josemendez Wrote: No. That wouldn't be pooling, would it?

The whole point of a memory pool is to avoid runtime allocation and garbage collection. Allocating memory at runtime is costly, and sets you up for GC. That's why pooling is used as a strategy to create/destroy things at runtime: you create as many "things" (in this case, particles) as you'd possibly need, and just activate/deactivate them at runtime. Changing the size of the pool at runtime would defeat its purpose.

Ok, that's what I thought. It just didn't work from script because I forget to add :
Code:
_obiBlueprint.GenerateImmediate();

However, it works now, thanks a lot Sonrisa
Reply


Messages In This Thread
RE: Defined a pooled particles from a given length - by lufydad - 09-02-2022, 04:26 PM