0
\$\begingroup\$

As the title says, I am learning VFX graph in Unity and I am curious where I should place "Set ... over Life", for example "Set Color over Life" which adjust the color based on the particle's age.

When we create a new visual effect graph, they are placed in the Output context by default, which kind of seems odd to me, since it seems more like a Update function? It also works if I place it in the Update context, but I am afraid that I probably mess with the performance if the block should not be placed there for some reason. Also, why can't I set it in the Initialize context - if I do, no changes over time are applied.

Probably someone could point me to the right documentation or some explanation for this, thanks. In general, it would be nice to have a documentation that states which blocks should be used within which context (Initialize, Update, Output).

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

You can place the "Set Color over Life" in any of the sections you are able to drag it into, it wont allow you to place it in the section if it can't be used there, but I believe the Output is the only section with unique blocks, as you've noticed if you place "Set Color over Life" on initialize, it will set the "Set Color over Life" property at the (start), you can then change that property again while the particle lives (update) if you required and when it is finally rendered with (Output).

Although less useful, it really depends on the behaviour you are trying to achieve as to when/how you employ these different blocks.

I would not worry about performance regarding where you place these blocks as they are very preformant and nearly all of the time the problems with performance will depend entirely on how complex you make the graph and how many total particles you can use.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .