Closed passivestar closed 1 week ago
afaik dropping a resource on a node in the tree usually means "set a property": for example dropping a texture on a Sprite2D
, or an AudioStream
on an AudioStreamPlayer
(or any node that has an AudioStream
property).
@mieldepoche it could keep the old behavior if the node has a stream property and add a new node if it doesn't
We could enable dropping in between nodes when dragging resource. Right now you can drop only on top of node.
https://github.com/godotengine/godot-proposals/assets/2223172/0b414627-bd3f-4692-abe7-9139c02b20ea
Describe the project you are working on
Quick game prototypes
Describe the problem or limitation you are having in your project
Adding sounds to the game could be a bit quicker
In Unity dropping a sound file into the hierarchy automatically creates a player for it. This QOL feature is convenient for quick game prototypes where you're not using any kind of a centralized audio manager singleton to play streams through, or if you're purposefully avoiding having such a singleton if you're trying to make game entities more self-contained
Describe the feature / enhancement and how it helps to overcome the problem or limitation
When you drop an
AudioStream
resource from the FileSystem dock onto a node in the Scene dock or into the viewport it would automatically create an appropriateAudioStreamPlayer
node and set itsstream
property to that resourceDescribe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The type of the node would depend on where you're dropping the stream:
Node3D
or into the 3D viewport would create anAudioStreamPlayer3D
Node2D
or into the 2D viewport would create anAudioStreamPlayer2D
AudioStreamPlayer
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not in a few
Is there a reason why this should be core and not an add-on in the asset library?
A small QOL editor feature