Script interface for the VelocityOverLifetimeModule of a Particle System. Script interface for the TriggerModule of a Particle System.Ĭontrols whether the Particle System uses an automatically-generated random number to seed the random number generator. Script interface for the TrailsModule of a Particle System. Script interface for the TextureSheetAnimationModule of a Particle System. Script interface for the SubEmittersModule of a Particle System. Script interface for the SizeOverLifetimeModule of a Particle System. Script interface for the SizeBySpeedModule of a Particle System. Script interface for the ShapeModule of a Particle System. Script interface for the RotationOverLifetimeModule of a Particle System. Script interface for the RotationBySpeedModule of a Particle System. Override the random seed used for the Particle System emission. The number doesn't include particles of child Particle Systemsĭoes this system support Procedural Simulation? The current number of particles (Read Only). Script interface for the NoiseModule of a Particle System. Script interface for the LimitVelocityOverLifetimeModule of a Particle System.Īccess the main Particle System settings. Script interface for the LightsModule of a Particle System. Script interface for the Particle System Lifetime By Emitter Speed module. Resume emitting by calling Play.ĭetermines whether the Particle System is paused.ĭetermines whether the Particle System is playing.ĭetermines whether the Particle System is in the stopped state. A Particle System may stop emitting when its emission module has finished, it has been paused or if the system has been stopped using Stop with the StopEmitting flag. Script interface for the InheritVelocityModule of a Particle System.ĭetermines whether the Particle System is emitting particles. Script interface for the ForceOverLifetimeModule of a Particle System. Script interface for the ExternalForcesModule of a Particle System. Script interface for the EmissionModule of a Particle System. Script interface for the CustomDataModule of a Particle System. Script interface for the ColorOverLifetimeModule of a Particle System. Script interface for the ColorByLifetimeModule of a Particle System. Script interface for the CollisionModule of a Particle System. This means that setting properties on a module struct doesn't set something in script that requires setting back to the Particle System it all happens automatically. Performance note: When setting properties on particle modules, the settings are passed immediately into native code. It is not necessary to create a MinMaxCurve or MinMaxGradient object in the ParticleSystemCurveMode.Constant mode.Įmission.rate = new ParticleSystem.MinMaxCurve(5.0f) To set a constant value for a parameter, all you need to do is assign a number to it. Parameters support a shorthand notation for simple constant values. These multiplier properties are all named after the curve they affect - for instance controls the overall effect of in a given system. Var emission = ParticleSystem.emission // Stores the module in a local variableĮmission.enabled = true // Applies the new value directly to the Particle SystemĮvery module has special multiplier properties that allow you to change the overall effect of a curve without having to edit the curve itself. When you set any property on a module struct, Unity immediately assigns that value to the Particle System.Īlso, because each module is a struct, you must cache it in a local variable before you can assign any new values to the module. The key difference is that it is not necessary to assign the struct back to the Particle System component. They are simply interfaces directly into the native code, so it is important to know how to use them, compared to a normal C# struct. These properties are structs, but do not behave like normal C# structs. Particle System properties are grouped by the module they belong to, such as ParticleSystem.noise and ParticleSystem.emission. In script, these parameters are accessible through ParticleSystem.main. These parameters are visible in the Inspector above all the other modules: The Particle System's general parameters are kept inside a special Main module.
0 Comments
Leave a Reply. |