09-07-2019, 06:33 PM
(This post was last modified: 09-07-2019, 06:38 PM by chipmeisterc.)
(09-07-2019, 10:46 AM)josemendez Wrote: Hi,Hi Jose,
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
Thanks for the reply -
Perhaps I should have been more clear.
I'm not looking to allocate more at runtime, what I'm trying to do is find the optimum pool size to use such that I'm not making unecessary allocations when I initially define my pool size. The trouble is, that the only way to test is at runtime by getting a feel for the current pool size vs length and the only way to then adjust is by reinitializing (in edit mode) which destroys my existing handle connections.
I guess the question therefore is - is there a way to reinitialize in the editor without breaking existing handle connections?