|
Hello. I know how you can change the color of particles from a script, how can I make it so that every time the effect is instantiated, the colors are different? Thanks.
(comments are locked)
|
|
Sadly due to snow and a lack of a pc nearby, I can't test the following. You could store the particle number in script and then when more particles exist try something like:
See http://unity3d.com/support/documentation/ScriptReference/Particle.html for more info. See http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter-particles.html to learn how to get and set particles from the emitter. I hope this helps :) Didn't work for me. when i put in with a GetKeyUp code it only turns white HELP
Nov 22 '11 at 04:57 PM
DzjengisKhan
Colors are not 0-255 unless you use the Color32 class.
Nov 22 '11 at 04:59 PM
Jessy
@DzjengisKhan: Don't ask questions as an ANSWER to this question. Answers should answer the question. Use "add new comment" if you want to clarify something. Beside that, yes you're right, It will most the time return a white color because the Color struct uses values between 0.0 and 1.0 To use byte color values you can use the Color32 struct which converts automatically into a Color struct. So either use: or
Nov 22 '11 at 05:06 PM
Bunny83
I've fixed the answer ;)
Nov 22 '11 at 05:07 PM
Bunny83
(comments are locked)
|
