Skip to content

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

Open
@Lennart-Bours

Description

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions