below is my code: It does nothing. I cannot find any way to enable and disable emission through code. The Play(), Pause(), and Stop() functions of the particle system class are also not doing anything. My particle system is assigned through the inspector. What am I missing? Thanks for the help.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Activate : MonoBehaviour
{
public ParticleSystem Particles;
void start()
{
Particles.emission.enabled = false;
}
void OnTriggerEnter (Collider other)
{
if(other.CompareTag("Player"))
{
Particles.emission.enabled = true;
}
}
void OnTriggerExit (Collider other)
{
if(other.CompareTag("Player"))
{
Particles.emission.enabled = false;
}
}
}