Fix instantiate() not working

This commit is contained in:
JeremyStar™ 2024-05-18 19:36:37 +02:00
parent d80f17bdc7
commit 0e9e1c6ea4
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -49,9 +49,9 @@ var format_loaders: Dictionary = {
var resource_cache: Dictionary = {}
## Loads a resource. Supports native and dynamic resource loading.
func load_resource(path: String) -> Resource:
func load_resource(path: String) -> Object:
logger.diag("Loading resource located at " + path)
var resource: Resource = null
var resource: Object = null
# Check if path exists
if !FileAccess.file_exists(config_load_path + path):
@ -74,8 +74,8 @@ func load_resource(path: String) -> Resource:
return resource
## Handles dynamic resource loading using format loaders ([member format_loaders]).
func _load_resource_handler(path: String) -> Resource:
var resource: Resource = null
func _load_resource_handler(path: String) -> Object:
var resource: Object = null
var error: Error = Error.OK
var type: Resource = null