0 votes

Is there any way to add a shortcut to create new resource in file system?

Reason is: it would save lots of click and navigation as create new resource is one of the most used command in my workflow.

Godot version v3.4.1.stable.official [aa1b95889]
in Engine by (12 points)

I don't think there is, but you can suggest it in the suggestions github https://github.com/godotengine/godot-proposals

1 Answer

0 votes

I use an external shell script, because it gets slightly involved. A key item to remember is Godot will watch the filesystem and update itself.

A typical component Widget for me will start with the same sample, copy the script, and then also copy a WidgetHarness with script to test it. That said, here's my script for use in MacOS...

echo "In Project" $PROJECT
echo "   Add Component $COMPONENT"
read -n 1 -p 'Press any key if this looks good.'
echo "\nCreate the $DEST directory"
mkdir $DEST
read -n 1 -p 'Press any key to continue...'
echo "\nCopy basic files from BLANK's Hello compoenent"
cp $GODOT/Blank/Components/Hello/Hello.gd $DEST/$COMPONENT.gd
cp $GODOT/Blank/Components/Hello/Hello.tscn $DEST/$COMPONENT.tscn
cp $GODOT/Blank/Components/Hello/HelloHarness.gd $DEST/${COMPONENT}Harness.gd
cp $GODOT/Blank/Components/Hello/HelloHarness.tscn $DEST/${COMPONENT}Harness.tscn
ls -l $DEST
read -n 1 -p 'Press any key to continue...'
echo "\nFix references to new name"
sed -i '' "s/Hello/$COMPONENT/g" $DEST/*
by (327 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.