Version: 2018.3 (switch to 2019.1 )
Trails module
Renderer module
Other Versions

Custom Data module

The Custom Data module allows you to define custom data formats in the Editor to be attached to particles. You can also set this in a script. See documentation on Particle System vertex streams for more information on how to set custom data from a script and feed that data into your shadersA small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
See in Glossary
.

Data can be in the form of a Vector, with up to 4 MinMaxCurve components, or a Color, which is an HDR-enabled MinMaxGradient. Use this data to drive custom logic in your scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
and Shaders.

The default labels for each curve/gradient can be customized by clicking on them and typing in a contextual name. When passing custom data to shaders, it is useful to know how that data is used inside the shader. For example, a curve may be used for custom alpha testing, or a gradient may be used to add a secondary color to particles. By editing the labels, it is simple to keep a record in the UI(User Interface) Allows a user to interact with your application. More info
See in Glossary
of the purpose of each custom data entry.

  • 2017–09–04 Page amended with limited editorial review
  • Editable custom data labels added in Unity 2017.2 NewIn20172
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答