diff --git a/debugger/behavior_tree_view.cpp b/debugger/behavior_tree_view.cpp index 8775b3f..9067eeb 100644 --- a/debugger/behavior_tree_view.cpp +++ b/debugger/behavior_tree_view.cpp @@ -1,5 +1,7 @@ /* behavior_tree_view.cpp */ +#ifdef TOOLS_ENABLED + #include "behavior_tree_view.h" #include "behavior_tree_data.h" #include "core/math/color.h" @@ -157,3 +159,5 @@ BehaviorTreeView::BehaviorTreeView() { tree->connect(SNAME("item_collapsed"), callable_mp(this, &BehaviorTreeView::_item_collapsed)); } + +#endif // TOOLS_ENABLED \ No newline at end of file diff --git a/debugger/behavior_tree_view.h b/debugger/behavior_tree_view.h index 563e2ae..876492d 100644 --- a/debugger/behavior_tree_view.h +++ b/debugger/behavior_tree_view.h @@ -1,5 +1,7 @@ /* behavior_tree_view.h */ +#ifdef TOOLS_ENABLED + #ifndef BEHAVIOR_TREE_VIEW_H #define BEHAVIOR_TREE_VIEW_H @@ -42,4 +44,6 @@ public: BehaviorTreeView(); }; -#endif // BEHAVIOR_TREE_VIEW \ No newline at end of file +#endif // BEHAVIOR_TREE_VIEW + +#endif // TOOLS_ENABLED \ No newline at end of file diff --git a/register_types.cpp b/register_types.cpp index 7b30fb9..cca0add 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -168,8 +168,6 @@ void initialize_limboai_module(ModuleInitializationLevel p_level) { GDREGISTER_CLASS(BBVector3Array); GDREGISTER_CLASS(BBVariant); - GDREGISTER_CLASS(BehaviorTreeView); - _limbo_utility = memnew(LimboUtility); GDREGISTER_CLASS(LimboUtility); @@ -180,7 +178,10 @@ void initialize_limboai_module(ModuleInitializationLevel p_level) { #ifdef TOOLS_ENABLED if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { EditorPlugins::add_by_type(); + } else if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { + GDREGISTER_CLASS(BehaviorTreeView); } + #endif }