Skip to main content
Fixed some grammar mmistakes
Source Link
GospelBG
  • 73
  • 2
  • 14

I have a script that is made to runruns when the game is loading. That script setsets the resolutionsresolution, fullscreen, and loads other screen and important settings and it applies them.

I I have the script attached to a gameObjectgameObject in the main screen that have some game and scene scripts. The

The problem is that everytime that you return to the main scene, that script runs again and causecausing several bugs.

So,Is there is a way to run a script only at game startup?

I have a script that is made to run when the game is loading. That script set the resolutions, fullscreen, and loads other screen and important settings and it applies them.

I have the script attached to a gameObject in the main screen that have some game and scene scripts. The problem is that everytime that you return to the main scene, that script runs again and cause several bugs.

So, there is a way to run a script only at game startup?

I have a script that runs when the game is loading. That script sets the resolution, fullscreen, and loads other screen and important settings and applies them. I have the script attached to a gameObject in the main screen that have some game and scene scripts.

The problem is that everytime you return to the main scene, that script runs again causing several bugs.

Is there a way to run a script only at game startup?

Source Link
GospelBG
  • 73
  • 2
  • 14

Run a Script at Game Startup in Unity

I have a script that is made to run when the game is loading. That script set the resolutions, fullscreen, and loads other screen and important settings and it applies them.

I have the script attached to a gameObject in the main screen that have some game and scene scripts. The problem is that everytime that you return to the main scene, that script runs again and cause several bugs.

So, there is a way to run a script only at game startup?