Godot - Break out of a for loop
GDScript code example to break out of a for loop.
The "break" statement can be used to break out of a for loop midway.
for i in 10:
print(i)
if i == 2:
break
WEB Design & Material Images
GDScript code example to break out of a for loop.
The "break" statement can be used to break out of a for loop midway.
for i in 10:
print(i)
if i == 2:
break