HDRPでも動くこと確認済み。
蝶々の.vfxで試したのでバタフライメイカーという名前になってます
もう少し使いやすく改良します、いずれ
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ButterFliesMaker : MonoBehaviour
{
public GameObject butterFliesPrefab;
float span = 1.0f;
float delta = 0;
void Update()
{
this.delta += Time.deltaTime;
if(this.delta > this.span)
{
this.delta = 0;
GameObject birth = Instantiate(butterFliesPrefab);
int px = Random.Range(-7, 6);
birth.transform.position = new Vector3(px, 5.0f,0.0f);
}
}
}