C# [Tool] usage guidelines#12122
Open
Luna-MN wants to merge 2 commits into
Open
Conversation
Added guidelines for using the [Tool] attribute in C#, including initialization of arrays, keeping constructors empty, and avoiding destructive logic in property setters. as per the current tool limitations within Godot C# godotengine/godot-proposals#9001
paulloz
reviewed
Jul 3, 2026
paulloz
left a comment
Member
There was a problem hiding this comment.
My first two cents.
- I'm wondering if Current gotchas and known issues, or Common pitfalls wouldn't be a better place for this? It's always possible to add a link wherever.
- Are all of the points specific to C#? For instance, the page already contains a danger section about scene tree manipulation at the top.
- This can wait for after more important points have been cleared up, but the code blocks do not follow the style guide.
Author
|
as its to do with the tool attribute I added it within that page, if it'd be better in that page i can add it there, and add a warning link somewhere here to redirect there, or the other way around? these are all problems with C#, due to how it builds the script and applies it to the node, as it was C# related and i know the common user will be using GDScript i added it to the bottom, this can be moved if needed apologies i will rectify the code style |
Member
|
Documentation maintainers might have a stronger opinion than me about where this should live. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added guidelines for using the [Tool] attribute in C#, including initialization of arrays, keeping constructors empty, and avoiding destructive logic in property setters. as per the current tool limitations within Godot C# godotengine/godot-proposals#9001