Daily Godot Tip #1: You can hold ctrl and drag a node from the scene into a script to automatically create an onready variable for that node

https://programming.dev/pictrs/image/7cf9eb8a-cc67-483a-8fd9-d8a0dc7492b6.webm

Going to start doing some daily Godot tips, both to force me to look for cool things the editor does so I can use it myself and to help out anyone else

Also posting these on my account on https://bytes.programming.dev

If youve got any tips I can put for a future day feel free to give me it and I can queue it up if I havent already

98 points · 4 comments · view on lemmy.world

4 Comments

Bougie_Birdie@lemmy.blahaj.zone · 17 pts · 2y

Thanks! This is going to save me a ton of typing.

GoOnASteamTrain@lemmy.ml · 4 pts · 2y (1 reply)

What the flip?! That's fantastic! :) Thank you, if you have more of these I'd love to learn more.

Ategon@programming.dev · 5 pts · 2y

Should be posting these daily for awhile

Cpt_ManlyPink@programming.dev · 4 pts · 2y

It's awesome shortcut and I use it all the time. But there is nuance

For it to work there is specific order of actions

  • start dragging
  • before letting go mouse button, press and hold ctrl

If you hold ctrl at the start it does something different ( don't have Godot at hand to confirm what it was )