Skip to content

Smartly create a new variable when Ctrl-dropping a resource in an empty script line #7673

Closed
godotengine/godot
#81708
@mieldepoche

Description

Describe the project you are working on

trying things in godot

Describe the problem or limitation you are having in your project

In this clip, I drop first a node and then a resource while holding Ctrl.

simplescreenrecorder-2023-09-15_15.21.48.webm

One of those cases create a variable for you, the other doesn't.

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

When holding Ctrl and dropping a resource from the filesystem on an empty line in a script, automatically create a variable in a similar way.

The type should be as narrow as possible (and should include user-defined resources).
If dropped on an non-empty line, the current behavior should apply.

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

simplescreenrecorder-2023-09-15_15.41.30.webm

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

it allows saving a bit of typing and it's a consistency improvment

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

small ux improvement

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions