public void increaseSpeed()
{
speed += 0.1f;
Time.timeScale = speed;
}
public void decreaseSpeed()
{
speed -= 0.1f;
Time.timeScale = speed;
}
I an calling these functions through the buttons, but when I ma pressing a button and releasing that, and when I am pressing the Spacebar speed getting increased and decreased. I am new to Unity, Please help me.