5.6 Particle System custom data in inspector...?

“In Unity 5.5, we added support for attaching custom data to your particles, which can be accessed from both script and shaders. In the 5.6 beta, we have extended this system, so that you can configure it directly in the Inspector, making it simple to define curves and colors, which can be used to drive custom logic in your scripts and shaders.”

What does this mean exactly? I’m looking at the particle system in 5.6.0b1, under custom vertex streams, and don’t see anything about defining curves and colors. I’ve been able to use the custom streams to edit color over lifetime or speed through the shader, for example. But what is this curve in the inspector stuff? Is it something that needs to be built from the shader and it shows up in the inspector?

Hey, sorry this isn’t clear to you!

There is a new module called Custom Data. Look in the list of modules e.g. Velocity over Lifetime, Shape, etc, and you should find it.

Once you have set some data in there, you can do 2 things with it:

  1. Go to the Renderer Module and add the Custom1 or Custom2 streams. Then the custom data will appear in your shader as vertex input data.
    Unity - Manual: Particle System vertex streams and Standard Shader support

  2. Call GetCustomParticleData from script.
    Unity - Scripting API: ParticleSystem.GetCustomParticleData

The links are to 5.5 docs but they are still relevant for figuring out how to use the custom data once you’ve set it up.

Hope it helps!

3 Likes

Oh I see, thanks for the clarification.

1 Like

Long shot at resurrecting this one.
Trails (created by the particles themselves) do not inherit the custom data, is that correct?

Yes it’s correct. Trails do not support the custom vertex data.