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

Improve exported variable organization #3500

Closed
Duroxxigar opened this issue Nov 5, 2021 · 1 comment
Closed

Improve exported variable organization #3500

Duroxxigar opened this issue Nov 5, 2021 · 1 comment
Labels

Comments

@Duroxxigar
Copy link

Describe the project you are working on

Pretty much any game in Godot

Describe the problem or limitation you are having in your project

It is currently quite cumbersome to organize your exported variables. You need to have the script as a tool script, as well as override _get_property_list and then add some properties there. There is a lot of boilerplate with this. Especially when you need to also override _get and _set as well. And that is so that we can organize our variables with categories and collapsible sections like in this screenshot

image

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I propose that we move this kind of functionality into the new annotations in GDScript 2.0. Not too sure how it works under the hood just yet however.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I propose that the team looks into a more user friendly approach. With GDScript 2.0, we can use the annotations to handle this. This would be the proposed syntax.

@export(category=character, section=movement)
var move_speed

If this enhancement will not be used often, can it be worked around with a few lines of script?

It would be used quite frequently as exporting variables is a pretty common thing to do.

Is there a reason why this should be core and not an add-on in the asset library?

GDScript exports

@KoBeWi
Copy link
Member

KoBeWi commented Nov 5, 2021

Duplicate of #3451 / #1255

@KoBeWi KoBeWi marked this as a duplicate of #3451 Nov 5, 2021
@KoBeWi KoBeWi closed this as completed Nov 5, 2021
@KoBeWi KoBeWi added the archived label Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants