- Home /
Change Particle StartColor 'Random Between Two Colors'
I've got a ParticleSystem that is activated when the player dies, my player can be various colours during the game so I want the particles to match its current colours
I know I can change the start colour with the following code:
this.particleSystem.startColor = Color.blue;
This works, however I'm using the 'Random Between Two Colors' option and that code only changes the first colour. I need to be able to change both colors in code, and I'm totally stumped on how to do it. I've searched Unity answers but haven't been able to find an answer.
Hope that makes sense, any help is really appreciated Thanks
Answer by Paulius-Liekis · Aug 18, 2013 at 07:12 PM
I don't think you can do it in runtime, but you can do it from an Editor script. See the answer on this one:
http://answers.unity3d.com/questions/483831/how-to-modify-particlesystem-from-editor-script.html
Your answer
Follow this Question
Related Questions
Changing particlesystem at runtime 0 Answers
GameObject keeps acting like gameObject. 1 Answer
Destroy particles based on bounds not lifetime 0 Answers
How to get newest Particle in a ParticleSystem 1 Answer
Multiple Cars not working 1 Answer