This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I have an editor plugin that runs C# unit tests. I'd like to tweak it so that, right before tests are run, the C# project recompiles. How do I do that? Does Godot expose an API for that to editor plugins?

Godot version 3.4
in Engine by (18 points)

The editor uses the MSBuildPanel and calls 'BuildSolution' when the button is pressed; I can't see from a cursory glance how it does this from elsewhere but, it might just be simpler to launch a process/cli that calls msbuild (in GodotSharp), feeding it the solution file (for example, when you initialise the test).

1 Answer

0 votes

Perhaps also consider using an IDE such as Visual Studio or Rider. Assuming the test code has its own project, and has the main project as a dependency, both will build the game independently of godot.

by (1,406 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.