in this part of the script, a float variable is incremented while the player release the fire1 button, but always, when i try this, unity crashes.
if (Input.GetButtonDown("Fire1"))
{
while (!Input.GetButtonUp("Fire1"))
{
Power = Power + 1 * Time.deltaTime;
Debug.Log(Power);
}
}
“power” is a public float.
it happens even if i invert the while and BottonUp (while (Input.GetButtonDown(“Fire1”))
thanks for the time