Alternate solution to prevent double play

i know that there is not an only one solution in coding stuff but i coded it this way and tested it so it works clearly.
Ekran görüntüsü 2023-04-20 023637

  1. i add a bool variable named “isEffectable” that allows to play the effects.
  2. if the player crashes, it becomes “false”
  3. and it becomes “true” again with the loadscene method.
    waiting for your comments. thanks <3
1 Like

Technically, you don’t need the isEffectable=true in ReloadScene. You are initialising it to true, and when SceneManager.LoadScene(0) runs, everything is unloaded so that next line is probably not even executing.

1 Like

Thank you for your info :heart:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms