Search Unity

Is it possible to get the current color of a particle (Shuriken)

Discussion in 'Scripting' started by Zenix, Feb 18, 2014.

  1. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    I can get an array of Particles by calling ParticleSystem.GetParticles(), however, particle.color (very unhelpfully) contains only the starting color of the particle, not the current color.

    I could calculate the color myself, but I can't see anyway to retrieve the 'Color over Lifetime' values.

    Is there anyway to get the actual, current color, of a particle?
     
    shottogan likes this.
  2. nbg_yalta

    nbg_yalta

    Joined:
    Oct 3, 2012
    Posts:
    378
    *BUMP*

    I've tried to get color over lifetime using particle.colorOverLifetime.color.color
    But return value is always RGBA(0.000, 0.000, 0.000, 0.000)
     
    Last edited: May 27, 2017
  3. shottogan

    shottogan

    Joined:
    Feb 25, 2015
    Posts:
    3