Skip to content

ResourceManager ​

Inherits: RefCounted

THE resource manager - handles ALL resource types and operations Live editing - no save logic needed

Variables ​

Stringresource_type"Universal"
Stringfile_extension".tres"
Stringdefault_resource_path"res://src/data/"
Dictionaryopen_buffers{} # {path: {resource: Resource}}
intmax_recent_files10
Stringrecent_files_setting_key"universal_recent_files"

Methods ​

Resourcecreate_resource( type: String, name: String, extra_params: Dictionary = {} )
booldelete_resource( type: String, identifier )
Resourceget_resource( type: String, identifier )
Arrayget_all_resources( type: String )
voidhandle_file_moved( old_path: String, new_path: String )
voidhandle_file_deleted( path: String )

Signals ​

resource_created( path: String, resource: Resource ) ​

resource_opened( path: String, resource: Resource ) ​

resource_deleted( path: String ) ​

resource_moved( old_path: String, new_path: String ) ​

Variable descriptions ​

String resource_type = "Universal" ​

No description yet.

String file_extension = ".tres" ​

No description yet.

String default_resource_path = "res://src/data/" ​

No description yet.

Dictionary open_buffers = # path: resource: Resource ​

No description yet.

int max_recent_files = 10 ​

No description yet.

String recent_files_setting_key = "universal_recent_files" ​

No description yet.

Method descriptions ​

Resource create_resource( type: String, name: String, extra_params: Dictionary = {} ) ​

No description yet.

bool delete_resource( type: String, identifier ) ​

No description yet.

Resource get_resource( type: String, identifier ) ​

No description yet.

Array get_all_resources( type: String ) ​

No description yet.

void handle_file_moved( old_path: String, new_path: String ) ​

No description yet.

void handle_file_deleted( path: String ) ​

No description yet.