ParticleModifier

ParticleModifier#

NAMESPACE:

UnityUtils.ScriptUtils.Particles

The ParticleModifier is used to easily play particle systems.

Example Usage#

using UnityEngine;
using UnityUtils.ScriptUtils.Particles;

public class ExampleScript : MonoBehaviour
{
     public GameObject particles;

     void Start()
     {
        // Set particle system colour.
        ParticleModifier.SetParticleSystemColor(particles, Color.blue);
     }
}

Functions#

UnityUtils.ScriptUtils.Particles.ParticleModifier

Public Static Functions

void SetParticleSystemColor(GameObject particleSystem, Color color)#

Sets the start color of the specified particle system.

void SetParticleSystemGradientColor(GameObject particleSystem, Gradient gradient)#

Sets the start color of the specified particle system to use the provided gradient.

ParticleSystem GetParticleSystem(GameObject obj)#

Tries to get the particle system on the given object, prints a warning message if it doesn’t exist and returns null.