|
The particles that I wish to change color are attached to a game object and have all the other necessary components such as the animator and renderer. Here is how I am coding it:
Apparently, the condition comparing the first element of the colorAnimation of the ParticleAnimator component is not white, when i know that it is..What could be the problem? I also tried GetComponent().colorAnimation[0].Equals(Color.white); and that did not help either.
(comments are locked)
|
|
Are you sure it's white? Color.white is Color(1.0, 1.0, 1.0, 1.0) and you could be using Color(1.0, 1.0, 1.0, 0.0) or something. @lampshade: colors in Unity are normalized in the 0.0 to 1.0 range. See the docs; the color values you're using in your code won't work at all. http://unity3d.com/support/documentation/ScriptReference/Color.html Assuming 8 bits per gun, 0.0 = 0, and 1.0 = 255. What you're using is Color(1.0, 1.0, 1.0, .0392) approximately, which is not Color.white.
Apr 27 '11 at 07:21 AM
Eric5h5
(comments are locked)
|

Where are you assigning the modifiedColors back to the pAnimator?
right, i rushed through that, thanks DaveA, your suggestion was/is the answer.