Fix instantiate() not working
This commit is contained in:
parent
d80f17bdc7
commit
0e9e1c6ea4
1 changed files with 4 additions and 4 deletions
|
@ -49,9 +49,9 @@ var format_loaders: Dictionary = {
|
||||||
var resource_cache: Dictionary = {}
|
var resource_cache: Dictionary = {}
|
||||||
|
|
||||||
## Loads a resource. Supports native and dynamic resource loading.
|
## 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)
|
logger.diag("Loading resource located at " + path)
|
||||||
var resource: Resource = null
|
var resource: Object = null
|
||||||
|
|
||||||
# Check if path exists
|
# Check if path exists
|
||||||
if !FileAccess.file_exists(config_load_path + path):
|
if !FileAccess.file_exists(config_load_path + path):
|
||||||
|
@ -74,8 +74,8 @@ func load_resource(path: String) -> Resource:
|
||||||
return resource
|
return resource
|
||||||
|
|
||||||
## Handles dynamic resource loading using format loaders ([member format_loaders]).
|
## Handles dynamic resource loading using format loaders ([member format_loaders]).
|
||||||
func _load_resource_handler(path: String) -> Resource:
|
func _load_resource_handler(path: String) -> Object:
|
||||||
var resource: Resource = null
|
var resource: Object = null
|
||||||
var error: Error = Error.OK
|
var error: Error = Error.OK
|
||||||
var type: Resource = null
|
var type: Resource = null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue