Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The interaction between a C# [Tool] script and Resources is not clearly documented #10616

Open
Lennart-Bours opened this issue Feb 4, 2025 · 0 comments

Comments

@Lennart-Bours
Copy link

Lennart-Bours commented Feb 4, 2025

Your Godot version:

4.3

Issue description:

In GDScript, a @tool script can reference a non @tool resource object. In C#, as soon as a script is marked [Tool], any Resource derived custom classes it references must be marked [Tool] as well. This is non-trivial, and not clearly documented, as can be seen by the issues opened about it:

godotengine/godot#80021
godotengine/godot#80298
godotengine/godot#85825

There is a pretty nice page discussing the use of tool scripts in GDScript and C#. However, due to the phrasing it is not obvious this applies to Resource objects as well.

Suggestion

Add a sentence to note that any custom Resource referenced by a C# Tool script must be marked [Tool] as well.

URL to the documentation page (if already existing):

https://docs.godotengine.org/en/stable/tutorials/plugins/running_code_in_the_editor.html#important-information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants