-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
More user-friendly editor manipulation of export var such as Vector2 and Path2D #29520
Comments
That would make sense if your Vector2 is a position, but there are many uses of Vector2 which are not positions and for which a placement on the scene like Postion2D does not make sense (e.g. a direction vector, or an initial velocity vector). It does sound like the Position2D node would be a good match for your use case instead of export vars. |
Another thought: if user-configurable annotations are added to GDScript via plugins, then one could conceivably write a plugin that recognizes a certain type of export flag on Vector2 values and then implements its own EditorInspectorPlugin and canvas viewport override to render a Position2D node exclusively within the editor, with the sole purpose of assigning a value to the Vector2. That would be a solution that doesn't involve modifying PropertyInfo hint values, adding a new EditorProperty type, or changing anything else about the engine/editor tailored for this solution. It would just be low-level stuff (add annotations, allow plugins to create new annotations) that empowers plugin developers to create better editor tools to match their needs. This would be another use-case for having annotations that impart some level of functionality rather than just metadata (#20318). |
I have a proposal about Vector2/3 visual editing at godotengine/godot-proposals#397, and in fact created an editor plugin for it. It does not allow to export Vector2/3 with a hint, but instead allows to edit a resource containing the vectors themselves, which is supported currently. This certainly has limitations but as an initial implementation this may be a good enough workaround. Of course it would be much more convenient to embed an |
Superseded by godotengine/godot-proposals#397. |
It would be helpful if the editor supported more export var types.
What I mean by this is, when exporting a Vector2, it would be better to have a draggable point visible in the scene, instead of changing the values manually.
Even more importantly, some data types such as Path2D aren't usable as export vars, as the buttons in the editor to modify points do not appear. (This could possibly be two seperate issues.)
My use-case: 'dynamic' nodes which draw themselves
The text was updated successfully, but these errors were encountered: