unity says:
“No MonoBehaviour scripts in the file, or their names do not match the file name”
i cannot add as a component to my game object.
public class DestroyFinishedParticle : MonoBehaviour {
private ParticleSystem thisParticleSystem;
// Use this for initialization
void Start()
{
thisParticleSystem = GetComponent<ParticleSystem>();
}
// Update is called once per frame
void Update () {
if (thisParticleSystem.isPlaying)
return;
Destroy(gameObject);
}
}