Search Unity

Bug Crashing from rapid play mode presses

Discussion in 'Editor & General Support' started by Kaivian, May 14, 2021.

  1. Kaivian

    Kaivian

    Joined:
    Jan 18, 2018
    Posts:
    35
    To specifically recreate this bug, you need a script that is trying to access an object that isn't instantiated. Then you need to start play (game window), stop play, and restart play (quickly).

    But I recommend something else that would just be a good idea... deactivate the play button for a few seconds after it is clicked, both when starting and stopping it. Also, unity should discard any extra activations before this time.

    Alternatively, when unity detects that it has fully started or stopped play, it waits a small amount of time to reactivate the button.