invokerepeating in unity C# code example
Example: unity invokerepeating
void Start()
{
//function name, start in, every (x) seconds
InvokeRepeating("LaunchProjectile", 2.0f, 0.3f);
}
void LaunchProjectile()
{
Rigidbody instance = Instantiate(projectile);
}