mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 12:26:59 +01:00
Instance the proper base type when using scripts in mat maker gd editor.
This commit is contained in:
parent
3e26ea2975
commit
76464a0509
@ -268,7 +268,10 @@ void MatMakerGDEditor::_on_AddPopup_ok_pressed(const int type, const String &dat
|
||||
Ref<Script> script = ResourceLoader::load(data);
|
||||
|
||||
if (script.is_valid() && script->can_instance()) {
|
||||
nnode.instance();
|
||||
nnode = Ref<MMNode>(ClassDB::instance(script->get_instance_base_type()));
|
||||
|
||||
ERR_FAIL_COND(!nnode.is_valid());
|
||||
|
||||
nnode->set_script(script.get_ref_ptr());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user