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

GDScript: Add custom export hints #65935

Closed
wants to merge 1 commit into from

Conversation

SirQuartz
Copy link
Contributor

@SirQuartz SirQuartz commented Sep 16, 2022

This pull request implements optional custom export hints when using @export.

Now you can do something like this:

@export("suffix:m") var myvar: Vector3

It'll appear like this in the inspector:
export hint

Here's a quick example:

custom.export.hint.mp4

In this example, I use "m" for meters as the exported suffix hint, but you could use anything as the hint like "g/cm^3", "mph", "gallons", "psi", etc.

Resolves: #61325

@SirQuartz SirQuartz requested a review from a team as a code owner September 16, 2022 20:43
@SirQuartz SirQuartz changed the title Add custom @export hints Add custom export hints Sep 16, 2022
@SirQuartz SirQuartz changed the title Add custom export hints GDScript: Add custom export hints Sep 16, 2022
@vnen
Copy link
Member

vnen commented Feb 6, 2023

This seems to work only for a very specific case. I would rather add a @export_custom annotation that allows setting any hint and hint_string so it can be used to all cases that don't have a specific annotation type.

@YuriSizov
Copy link
Contributor

Superseded by #72912.

@YuriSizov YuriSizov closed this Feb 8, 2023
@SirQuartz SirQuartz deleted the export-hint branch February 14, 2023 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gdscript: @export does not support custom hints (e.g. suffix:)
4 participants