Pretty simple. Is there any way to repeat this code, with the press of a key, indefinitely until i press another key?
The Code:
if (Input.GetKeyDown(KeyCode.Space))
{
grid.GridScan(new Vector3(0, 0, 0), 100);
}
Space, in this case, would be the button to start the repeating code. GridScan is a function that needs variables so it won't work with Invokerepeat (I don't think, tell me otherwise if im wrong).