0

How can I make the Ursina engine stop calling update() function every frame after a certain condition while also running rest of the script

The application.quit() terminates my script and app.destroy() just closes the window, while still calling update() every frame.

Aarya
  • 1

1 Answers1

1

You could handle this case in your update() function in the form of a guard:

def update():
    if condition:
        return
    # normal code...
Jan Wilamowski
  • 3,308
  • 2
  • 10
  • 23