Skip to content

Conversation

@AdriaandeJongh
Copy link
Contributor

@AdriaandeJongh AdriaandeJongh commented Dec 14, 2023

Unless there's some hidden functionality somewhere, the docs state incorrectly that you can run an C# EditorScript even though there is no File > Run for C# scripts.

Edit: found that both C# and GDScript scripts can run, but only using the internal editor. This PR adds a note about that to the docs.

@AThousandShips AThousandShips added topic:dotnet area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:plugin labels Dec 14, 2023
@YuriSizov
Copy link
Contributor

It totally works.

image

What do you mean exactly by "there is no File > Run for C# scripts"? This describes the Godot editor UI. If you use an external editor for coding in C# (which is to be expected, of course), then no, there is probably no way to trigger this from there.

@AdriaandeJongh
Copy link
Contributor Author

I honestly didn't even know you could open C# scripts into the internal script editor. I tried but now I realize I had the editor setting 'Use External Editor' checked so I essentially never saw the internal editor, and there was no entry point for me to run the EditorScript.

I guess the larger issue here is that there is no entry point to run an EditorScript for people using an eternal script editor. And regardless of that UX overlook (good for an issue on the engine itself I guess) this fact is not in the documentation whatsoever. Will think about how to put that in the docs now.

@AdriaandeJongh AdriaandeJongh marked this pull request as draft December 14, 2023 14:26
@YuriSizov
Copy link
Contributor

This is a problem for GDScript-based EditorScripts as well. I want us to have a way to trigger any of the scripts from anywhere in the editor. This would also automatically resolve your issue, since you wouldn't need to open the script to run it. Although with C# you need to make sure to build the solution first, of course.

@AdriaandeJongh AdriaandeJongh changed the title Clarified that EditorScript can only run in GDScript Clarified that EditorScript can only run using the internal script editor Dec 14, 2023
@AdriaandeJongh AdriaandeJongh marked this pull request as ready for review December 14, 2023 14:52
@AdriaandeJongh
Copy link
Contributor Author

This is still a bit of an awkward PR, because the underlying feature is awkward. Should I close this?

@AThousandShips AThousandShips changed the title Clarified that EditorScript can only run using the internal script editor Clarify that EditorScript can only run using the internal script editor Sep 18, 2024
@tetrapod00
Copy link
Contributor

This is still a bit of an awkward PR, because the underlying feature is awkward. Should I close this?

The awkwardness of the underlying feature may be improved by godotengine/godot#99318.

In the meantime, I don't mind this PR, though it does now need a rebase.

@AdriaandeJongh
Copy link
Contributor Author

@tetrapod00 rebase done!

Copy link
Contributor

@tetrapod00 tetrapod00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to document this limitation, IMO. This will need a second opinion from another maintainer, since as you noted this is a bit of an awkward PR.

I left an optional suggestion to (subjectively) clarify the note a bit.

@skyace65
Copy link
Contributor

skyace65 commented Mar 2, 2025

Applied tetrapod's suggestion

@skyace65 skyace65 merged commit f0f13fc into godotengine:master Mar 2, 2025
2 checks passed
@skyace65
Copy link
Contributor

skyace65 commented Mar 2, 2025

Thanks!

@AdriaandeJongh AdriaandeJongh deleted the patch-2 branch March 2, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:dotnet topic:plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants