(スクリプト)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShotFireBall : MonoBehaviour
{
public GameObject fireBallPrefab;
void Start()
{
InvokeRepeating("ShotFire", 1, 2);
}
void ShotFire()
{
Instantiate(fireBallPrefab, transform.position, transform.root.rotation);
}
}
(実行結果)