Updating to ParticleSystems In Unity3D
This article loosely based on a service I want created and hopefully will soon be published. I just thought it would be beneficial for some to know. Since I like to keep on top of things this is one of the many issue I run into when adapting other people's code. This is a huge jump from 2016 to the 2017 version of unity3d.
Notes
- https://www.gamasutra.com/view/feature/131565/building_an_advanced_particle_.php
Using the correct enable property
- https://docs.unity3d.com/ScriptReference/ParticleSystem.EmissionModule-enabled.html
Max and Min Particles
Seems to be gone
- http://answers.unity3d.com/questions/1136597/changing-particle-emission-rate-via-c-script.html
I believe the fields move to MinMaxCurve
- http://answers.unity3d.com/questions/1395242/particlesystem-does-not-contain-a-definition-for-m.html
- https://docs.unity3d.com/ScriptReference/ParticleSystem.MinMaxCurve.html
ParticleSystem.startLife
Instead of this field on the particle system it is on the main module, so use something like this.
particlesystem.main.startLifetimeMultiplier. ParticleRender now on ParticleSystemRender probably the easiest one, not sure why that's not a suggestion by visual studio. In fact I think a lot of these suggestions should be.
Notes
- https://www.gamasutra.com/view/feature/131565/building_an_advanced_particle_.php
Using the correct enable property
- https://docs.unity3d.com/ScriptReference/ParticleSystem.EmissionModule-enabled.html
Max and Min Particles
Seems to be gone
- http://answers.unity3d.com/questions/1136597/changing-particle-emission-rate-via-c-script.html
I believe the fields move to MinMaxCurve
- http://answers.unity3d.com/questions/1395242/particlesystem-does-not-contain-a-definition-for-m.html
- https://docs.unity3d.com/ScriptReference/ParticleSystem.MinMaxCurve.html
ParticleSystem.startLife
Instead of this field on the particle system it is on the main module, so use something like this.
particlesystem.main.startLifetimeMultiplier. ParticleRender now on ParticleSystemRender probably the easiest one, not sure why that's not a suggestion by visual studio. In fact I think a lot of these suggestions should be.