Terachor/tracks/exampleautoload.gd
2024-08-27 18:35:42 -04:00

20 lines
640 B
GDScript

extends BaseTrack
# This is the same as example but uses the autoload system to automatically populate names from file names
# Gets the area that should become the name from regex
# You can use sites like this to help construct regex: https://regex101.com/
func _init():
_default = {
"artist": "Kevin MacLeod",
"thumbnail": preload("res://thumbnails/example.bmp"),
"source": "https://incompetech.com/",
"disabled": false
}
_autoload = {
"path": "res://music/example",
"pattern": "^[^.]+"
}
# You can still override things using a _tracks variable and the track set to the path to the file for what you want to override