diff --git a/src/inventory.cpp b/src/inventory.cpp index d58fece..1de9ebb 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -11,6 +11,8 @@ void Inventory::_bind_methods() { } void Inventory::_ready() { + if(gd::Engine::get_singleton()->is_editor_hint()) + return; this->parent_unit = gd::Object::cast_to(this->get_parent()); } diff --git a/src/register_types.cpp b/src/register_types.cpp index 033c432..e00dd6e 100644 --- a/src/register_types.cpp +++ b/src/register_types.cpp @@ -65,7 +65,7 @@ void initialize_gdextension_types(gd::ModuleInitializationLevel p_level) GDREGISTER_RUNTIME_CLASS(EntityHealth); GDREGISTER_CLASS(NavMarker); GDREGISTER_RUNTIME_CLASS(NavRoom); - GDREGISTER_RUNTIME_CLASS(Inventory); + GDREGISTER_CLASS(Inventory); GDREGISTER_RUNTIME_CLASS(RTSGameMode); GDREGISTER_RUNTIME_CLASS(RTSPlayer); }