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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
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.