When F5 is pressed, it starts building project instead of playing the scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lowpolygon

I am currently following the tutorial video on youtube learning how to use the engine.
And while following the tutorial, I must have accidently press something thing without knowing. Cause now whenever I press F5, instead of playing that scene, it would just start doing building solutions then it would crash out to desktop. Is there a shortcut key to toggle between play and build ??

F5 plays from the main scene which is the first scene the game will load. F6 will play the scene the editor is focused on. It’s unusual that running the game would crash godot because godot ceases the game and displays the errors, are there any plugins or GDNative scripts that could be causing this?

Magso | 2019-04-04 18:13

No, I don’t have any plugins installed. Like I said before, I am pretty new to the engine. I am just following tutorial videos to learn about the engine. Is there a error log file I can check or look up maybe that would shed some light ?

lowpolygon | 2019-04-04 23:17

Does this happen only when you press F5 or does it happen when you also click the play button?
If you’re on linux you can check /var/crash/. I don’t know where the crash files are on windows, they could be in program files or appdata.
I’m also quite new to Godot, I asked about plugins because of some of the import abominations I’ve seen over in Unity answers.

Magso | 2019-04-05 11:42

I tried both F5 and clicked on play. It just crashed.
I end up just starting a new project and it worked fine. I am not sure if the actual project files are corrupted.

lowpolygon | 2019-04-05 12:50

The problem might be in your main scene, have you checked scripts for any infinite loops such as a while statement?

Magso | 2019-04-05 16:10

The main scene only has one button. And a script which changes the text on the button when click on it. There is no loop. Can anyone tell me where is the error log file on window version ? if there is any

lowpolygon | 2019-04-05 23:54

:bust_in_silhouette: Reply From: Sousio

Same thing happens if the “Build Solution” button in top right corner is accidentally pressed, or when a C# script file is added to a project scene. They would add some files to your project folder that change the settings to make the mono available, which makes the “Build” as the default operation on playing the project’s scenes (no matter pressing F5 or F6…), also mono tab is added to the output window IDE beside the animation tab. (See Picture)

However if you don’t want to continue with mono or visual studio, and wanna continue your project with just GDScripts, you should delete the added files in your project folder. The mandatory file to be removed is “res://YourProjectName.sln”.
Also deleting “res://YourProjectName.csproj” and “res://Properties/AssemblyInfo.cs” files and “res://.mono” folder is optional.