I’m using the Multiple Position Binder to spawn particles for many objects. The problem is that if I add targets by hand, I would need to drag and drop more than 300 transforms into the Targets list. So, is there a way to add targets through script? pls. I haven’t found a document about this.
This looks like the same as my question
I’m guessing the assumption is that if you’re comfortable scripting, you don’t need to bother with the VFX binder helper scripts, which are designed to make drag and drop easy via the Inspector.
Instead, you can just modify the parameters (e.g, target Transform) directly on the VisualEffect component.
If you are used to the drag and drop method, you can do this by locking the VFX tab in the Inspector. Then, select all 300 and drag them to the empty Array. It will populate the array. This is a sort of ‘hidden’ feature that I didn’t know about for years, but certainly helps with this sort of thing.
I could not figure out how to populate the targets array via Script for the Multiple Position Binder. My understanding is that it’s not possible, so if you figure that out, please post how you did it!
I optimized the selection process. Basically, I wrote a script that searches and selects all the things I need to add, and with all of them selected, I drag and drop them once and for all.