Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2018.3.0a1
2018.3.4f1
2019.1.0a1
2019.2.0a1
Issue ID
1124145
Regression
No
Particles colorOverLifetime module becomes HDR when colorKeys are set
How to reproduce:
1. Open the user-submitted project ("ParticlesLifeOverTimeColorBug.zip")
2. Enter the "SampleScene" and click on the "Particles" object
3. In its Inspector Window, expand the Color Over Lifetime module and enter Play Mode
4. Observe that the color has been changed to HDR
Expected result: The set up color gradient is not set as HDR
Actual result: The set up color gradient is marked as HDR
Reproduced in: 2019.2.0a4, 2019.1.0b2, 2018.3.5f1, 2017.4.20f1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Non-multisampled texture binding errors are logged when running the DepthBlit URP scene with MSAA enabled on Vulkan
- The Editor does not recognize code errors in generic classes when using C# Source Generator to generate serialization code
- NullReferenceException is logged when undoing Deletion of a Visual Query Block of a Search Expression
- “Unsupported type MinMaxCurve” error and “Could not register property modification for animation binding…” warnings are thrown after moving playhead when Particle System Property is added to Animation window
- Nested LocalizedStrings can not query local variables
Resolution Note:
You've set a HDR color, so it's expected that you get invalid results.
Your code:
new ColorVal(){color=new Color(255, 255, 255,1),pos=1.0f},
This is using the Color struct, which is HDR and accepts floats. So each channel has 255.0f assigned to it. You probably intended to write:
new ColorVal(){color=new Color(1.0f, 1.0f, 1.0f, 1.0f),pos=1.0f},
or
new ColorVal(){color=new Color32(255, 255, 255,255),pos=1.0f},
Your code is doing a mixture of byte and float values (byte for RGB and float for alpha).
I hope this helps resolve your situation.