I recommend typing everything in this tutorial by hand without copying, as it helps deepen your understanding for the syntax and in general.
Create a new Project Folder and initialize Node.js within it.
mkdir express-redis
cd express-redis
for (let audio of document.querySelectorAll('audio')) {audio.volume = 0.5} | |
// lower volume periodically - good for google meet etc. | |
function lowerVolume(vol = .5) { | |
for (let audio of document.querySelectorAll('audio')) { | |
audio.volume = vol | |
} | |
} | |
let volInterval = setInterval(lowerVolume, 2000, .1) |
[ | |
{ | |
"title": "Legacy Mod loader", | |
"description": "Loader to use mods. Read the README file included in the download.", | |
"authors": | |
[ | |
"Hello World" | |
], | |
"tags": | |
[ |
extends TextEdit | |
var last_text: String | |
var last_selection: TextSelection | |
var autobrace_pairs := { | |
"(": ")", | |
"{": "}", | |
"[": "]", | |
'"': '"', | |
"'": "'", |
Note:
This mini tutorial is for Godot 3.5. There are some changes that need to be made for Godot 4, check them out in this other gist
Since there is no built-in method to add context actions, we have to make our own.
To start, we need to get the file system dock. This can be done in the EditorPlugin. If we need it in any other script, we can just pass it to them.
tool
@tool | |
extends EditorPlugin | |
var last_path := [] | |
func _process(delta: float) -> void: | |
# Optimally just do this on button press or connected to a signal | |
var new_path := get_inspector_full_selected_path() |
Creating a new plugin is best done through the ProjectSettings under Plugins > Create (top right)
Messing up the editor nodes happens quite a lot. When it does, you can use the Reload Current Project button
from the top menu > Project. If it happens often, you can also set a shortcut for it.
Useful in combination with that is the EditorSetting (not project) to re-open all scenes which were previously open.
You can find it under this path interface/scene_tabs/restore_scenes_on_load