-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add export variable unit hints to Inspector #10498
Comments
Why would you need a separate unit displayed beyond the existing unit suffix? What is insufficient about using the existing |
I think maybe you are not aware of it but you can do that with the suffix hint like this:
|
Or with |
Hey @Castro1709 and @AThousandShips, 👋🏻 Thanks so much for bringing this to my attention 😄 . I was referring to the information available in GDScript exported properties docs and C# exported properties docs, but I didn’t come across this feature there. I will investigate this further and will update the documentation to include this information if appropriate. |
Closing as already implemented, thank you for your proposal nonetheless |
Thanks for your time @AThousandShips, I have created docs PR #9785 to surface this functionality better |
Describe the project you are working on
A game prototype that makes heavy use of the inspector in the godot editor.
Describe the problem or limitation you are having in your project
While prototyping a game, I often change various variables such as speeds, angles, pixel values, and other parameters directly in the Inspector to modify and fine-tune my game mechanics.
The Inspector allows me to quickly and easily adjustment these values during development, but a key limitation I encounter is the lack of clarity regarding the units of these variables.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose extending the existing PropertyHint system in Godot (both in GDScript and C#) to allow for an additional unit hint to be displayed next to exported variables in the Inspector. This unit hint would provide context about the expected units of measurement (e.g., m/s, px, deg) for specific variables, making it easier for developers to understand and adjust their values directly in the Inspector.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I propose extending the existing PropertyHint system in Godot (both in GDScript and C#) to allow for an additional unit hint to be displayed next to exported variables in the Inspector. This unit hint would provide context about the expected units of measurement (e.g., m/s, px, deg) for specific variables, making it easier for developers to understand and adjust their values directly in the Inspector.
Possible Gdscript Example
Possible C# Example
Possible Screen Mockup #1


Possible Screen Mockup #2
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't believe there is currently a way to do this
Is there a reason why this should be core and not an add-on in the asset library?
It relates to how the core editor currently works
The text was updated successfully, but these errors were encountered: