Add 'GDscript Autoloads'

Spencer Killen 2022-12-09 05:25:24 +00:00
parent f1d13716e0
commit dfd5c1debe
1 changed files with 14 additions and 0 deletions

14
GDscript-Autoloads.md Normal file

@ -0,0 +1,14 @@
```gd
onready var util = get_node("/root/Util")
```
File util.gd
Contains common helper functions that can be used in multiple places in the codebase
```gd
onready var global_event_bus = get_node("/root/GlobalEventBus")
```
File: global_event_bus
Usage Example: effects/SinkBlock.gd
A place to put signals that need to be sent to between objects that don't share a scene