Unity烟花demo

示例:

Unity烟花demo

 按钮控制脚本

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FireworksController : MonoBehaviour
{
    public ParticleSystem fireworksParticle;
    // Start is called before the first frame update
    void Start()
    {
        fireworksParticle.Stop();
    }

  public void TriggerFireworks()
    {
        fireworksParticle.Play();
    }
}