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

c_sharp_exports.rst: clarify why exporting nodes/resources is useful #8860

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

31
Copy link
Contributor

@31 31 commented Jan 29, 2024

It's easy to miss how useful this is! It's is in my unwritten top 10 of 4.x features. 🙂

@AThousandShips AThousandShips added enhancement topic:dotnet area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels Jan 29, 2024
Comment on lines 86 to 87
Exporting a specific type of resource or node lets the property editor show a
filtered list of possibilities.
Copy link
Member

Choose a reason for hiding this comment

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

This is explained later on the Nodes and Resources sections. I think the intention was to keep the Basic usage section short and to the point. But I'm not necessarily against adding more details to this section, so if you think this comes up often enough that it warrants adding it then it's fine.

Also, since this page was originally copied from the GDScript docs we may want to copy over these changes.

Copy link
Contributor Author

@31 31 Jan 29, 2024

Choose a reason for hiding this comment

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

I think the Node and Resource sections are pretty bare themselves. I'm able to infer that if you're able to export a Node, then anything that "is" a Node should be able to be exported too, but even for me, I second-guess whether that's what the doc actually means or if that inference will bite me.

To get peoples' eyes on it while keeping the intro simple, how about removing [Export] public Resource Resource { get; set; } in the intro and go straight to [Export] public PackedScene PackedScene { get; set; } with a link to the section for more info? Pushed an attempt at that. (I can't think of a situation where exporting a Resource is actually useful... although for a Node it's more realistically useful.)

Copy link
Member

Choose a reason for hiding this comment

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

That works for me 👍

Copy link
Member

@raulsntos raulsntos left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@skyace65 skyace65 merged commit 654ee26 into godotengine:master Jan 30, 2024
1 check passed
@skyace65
Copy link
Contributor

Thanks!

@31 31 deleted the dev/31/export-node-res-useful branch January 30, 2024 00:22
mhilbrunner pushed a commit that referenced this pull request Jul 24, 2024
c_sharp_exports.rst: clarify why exporting nodes/resources is useful

(cherry picked from commit 654ee26)
@mhilbrunner
Copy link
Member

Cherry-picked to 4.2 in #9648.

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 enhancement topic:dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants