mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Added basic support for custom resource savers and loaders
This commit is contained in:
parent
ca28c455bf
commit
065e2670af
77 changed files with 1102 additions and 145 deletions
|
@ -417,8 +417,8 @@ void PluginScriptLanguage::unlock() {
|
|||
|
||||
PluginScriptLanguage::PluginScriptLanguage(const godot_pluginscript_language_desc *desc) :
|
||||
_desc(*desc) {
|
||||
_resource_loader = memnew(ResourceFormatLoaderPluginScript(this));
|
||||
_resource_saver = memnew(ResourceFormatSaverPluginScript(this));
|
||||
_resource_loader = Ref<ResourceFormatLoaderPluginScript>(memnew(ResourceFormatLoaderPluginScript(this)));
|
||||
_resource_saver = Ref<ResourceFormatSaverPluginScript>(memnew(ResourceFormatSaverPluginScript(this)));
|
||||
|
||||
// TODO: totally remove _lock attribute if NO_THREADS is set
|
||||
#ifdef NO_THREADS
|
||||
|
@ -429,8 +429,6 @@ PluginScriptLanguage::PluginScriptLanguage(const godot_pluginscript_language_des
|
|||
}
|
||||
|
||||
PluginScriptLanguage::~PluginScriptLanguage() {
|
||||
memdelete(_resource_loader);
|
||||
memdelete(_resource_saver);
|
||||
#ifndef NO_THREADS
|
||||
if (_lock) {
|
||||
memdelete(_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue