Change only one property of particle through code and let other properties change according to inspector settings
So I have a situation. I have a particle system that has changing color over lifetime, changing size over lifetime, texture sheet animation etc. In my C# script I get the individual particles of this system and alter their positition and then set the changed particles for my system with SetParticles()-method every frame. This way however only the position is updated anymore and any other property setted in the inspector won't change. Is there a way to update the particles simultaneoysly with code and inspector values?
can we see the relevant code part? I did exact same thing with all particle positions and haven't had any issues with all other values.
P.S. you have to get and set the particles every frame btw. because they're structs which get copied.
Aah i'm not getting the particles every frame right now, I'm just setting them. Going to try out both get and set every frame if it helps :)
I tried it and it worked, awesome! Thank you so much! :) I will post this as an answer to this question.
Answer by Piilorasva · Nov 25, 2016 at 06:27 AM
As @hexagonius suggested I didn't get the the particles every frame, I just setted them. After I also getted the particles again every frame everything started working properly.
Your answer
Follow this Question
Related Questions
Particles moving past gun. Please help. 1 Answer
Is it possible to create a touch input on spawned particles? 0 Answers
Need help. Particles make no sense at all 2 Answers
Enabling and disabling child particles 2 Answers
Having Player light torches Using Particle System and OnCollisionEnter? 1 Answer