Particle system BUG???
Hi all. I have an particle system with sizeOverLifeTime param enabled. When I'm trying to emit particles and change their size using script it does nothing, even if I disable sizeOverLifeTime inside script. But if sizeOverLifeTime was disabled from the beginning everything works fine. What is the problem with sizeOverLifeTime parameter? Script:
public class Test : MonoBehaviour {
public bool trigger;
public ParticleSystem m_System;
ParticleSystem.Particle[] m_Particles;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown("space"))
{
var sizeOverLifeTime = m_System.sizeOverLifetime;
sizeOverLifeTime.enabled = false;
m_System.Clear();
m_System.Emit(2000);
m_Particles = new ParticleSystem.Particle[2000];
var particles = m_System.GetParticles(m_Particles);
for (int i = 0; i < 1500; i++)
{
m_Particles[i].angularVelocity = 0;
m_Particles[i].startSize = 10;
}
m_System.SetParticles(m_Particles, particles);
m_System.Play();
}
}
}
It might be best to report a bug for this via the unity bug reporter inside the editor.
It might be that I'm doing something wrong? :)
Your answer
Follow this Question
Related Questions
Particle Effect appears low-quality in-game. 0 Answers
Some question about ParticleSystem.emit() rendering 0 Answers
Can I shoot a ray from a particle that hit a collider? 1 Answer
ParticleSystem.Bake() not working with specific particle 0 Answers
Particles disappear when the parent rotates,My particles disappear when the parent rotates 0 Answers