0

invokerepeater

STeven Grice 2 years ago 0

I am trying to recreate the C# below in BOLT:

But getting 

Trying to Invoke method: Variables.SpawnBall couldn't be called.


There seems no way to define a Method to be used in Calls like Invoke (invokerepeater)?

Thanks

Steven

C# Code Below.


using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class nspawner : MonoBehaviour

{

public GameObject ball;

public Transform SpawnPosition;

private Vector3 SpawnVector;

public float spawnTime = 3f;

// Use this for initialization

void Start () {

InvokeRepeating ("SpawnBall", spawnTime, spawnTime);

}

// Update is called once per frame

void Update () {

}

void SpawnBall()

{

var newBall = GameObject.Instantiate(ball, SpawnPosition.position, SpawnPosition.rotation);

}

}

Bolt Version:
1.4.11
Unity Version:
2019
Platform(s):
Windows
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x