Godot support
Support for Godot is based on the open-source Godot Support for Rider plugin. The plugin comes bundled with Rider, so manual installation is not required.
However, if you actively work with GdScript files, you can extend the feature set in these files even further with another plugin — GdScript supported by the community.
Get started
In most cases, JetBrains Rider is ready to work with Godot projects as soon as you install the Godot Engine on your machine.
There are several ways to open Godot projects in JetBrains Rider:
If the project only uses GdScript, select Select Folder.
from the main menu, choose the project folder, and clickIf the project uses C#, select .sln in the project folder.
from the main menu, and select the solution fileSet JetBrains Rider as the default editor for C# scripts in the Godot editor. In this case, you can double-click C# files in the Godot editor views to open them in JetBrains Rider. To do so, in Godot editor menu, select JetBrains Rider and Fleet in External Editor.
and selectIn a similar way, you can set JetBrains Rider as the default GdScript editor on the
settings page.To find the location of JetBrains Rider executable, switch to Rider, go to Installation home directory. On Windows, you need to point to bin/Rider64.exe. On macOS, you need to point to Rider's .app folder.
, and look forIn Exec Flags, specify the following:
{project} --line {line} {file}
.
Work with code
JetBrains Rider provides its renown code analysis, coding assistance, and code navigation features in C# and GdScript code in Godot projects.
Code analysis in GDScript is performed using the Godot Language Service via the LSP protocol. The Godot Language Service becomes available on your machine when you install the Godot Engine.
By default, JetBrains Rider establish the LSP connection with a running Godot editor. However, if you prefer to not have the Godot editor running, you can make Rider automatically start Godot LSP service in the background when needed. To do so, choose Automatically start headless LSP server in the LSP server connection: on the Languages & Frameworks | Godot Engine settings page Ctrl+Alt+S.
Run and debug
When you open a Godot project, JetBrains Rider automatically creates one or more run configurations that you can use to run and debug games. Debugging of Godot projects is performed via the Debug Adapter Protocol (DAP).
There are some differences in running Godot projects that only have C# code and projects that have GDScript or mixed GDScript/C# code.
Run and debug Godot projects with C# code
If you are going to debug your project, prepare your session by setting breakpoints where necessary.
Use the Player run configuration to launch your project. This configuration is created automatically when you open the Godot project
Alternatively, you can launch a single scene from your Godot/C# project. To do so, right-click a scene file .tscn and choose Debug '[scene name].
Godot projects with GDScript code can be launched from JetBrains Rider only under the debugger. To run such projects without debugging, use the Godot editor.
Debug Godot projects with GDScript code
Make sure that the Godot editor is running having the same project open.
If it is not running, you can start it from JetBrains Rider by clicking the Godot icon on the toolbar and choosing Start Godot Editor:
If you are going to debug your project, prepare your session by setting breakpoints where necessary.
Use the Player GDScript run configuration to launch your project. This configuration is created automatically when you open the Godot project
Debug both GDScript and C#
Start the debugging session with the Player GDScript configuration as described above.
Press Ctrl+Alt+F5 or select
from the main menu.Select the desired Godot process in the list and click Attach with .NET Debugger.
Test and profile C# project
If you use the gdUnit4Net unit testing framework to in your C# Godot project, you can use the extensive features for unit testing.
To profile the performance and memory of a C# Godot project, click the three-dots menu next to the automatically created Player run configuration and choose the desired profiling type:
Fore more information, see the original pull request in the Godot engine.