Compile BehaviorTree only into "tools" builds
This commit is contained in:
parent
9c1d0009ba
commit
62310a75df
|
@ -1,5 +1,7 @@
|
||||||
/* behavior_tree_view.cpp */
|
/* behavior_tree_view.cpp */
|
||||||
|
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
|
||||||
#include "behavior_tree_view.h"
|
#include "behavior_tree_view.h"
|
||||||
#include "behavior_tree_data.h"
|
#include "behavior_tree_data.h"
|
||||||
#include "core/math/color.h"
|
#include "core/math/color.h"
|
||||||
|
@ -157,3 +159,5 @@ BehaviorTreeView::BehaviorTreeView() {
|
||||||
|
|
||||||
tree->connect(SNAME("item_collapsed"), callable_mp(this, &BehaviorTreeView::_item_collapsed));
|
tree->connect(SNAME("item_collapsed"), callable_mp(this, &BehaviorTreeView::_item_collapsed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // TOOLS_ENABLED
|
|
@ -1,5 +1,7 @@
|
||||||
/* behavior_tree_view.h */
|
/* behavior_tree_view.h */
|
||||||
|
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
|
||||||
#ifndef BEHAVIOR_TREE_VIEW_H
|
#ifndef BEHAVIOR_TREE_VIEW_H
|
||||||
#define BEHAVIOR_TREE_VIEW_H
|
#define BEHAVIOR_TREE_VIEW_H
|
||||||
|
|
||||||
|
@ -42,4 +44,6 @@ public:
|
||||||
BehaviorTreeView();
|
BehaviorTreeView();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BEHAVIOR_TREE_VIEW
|
#endif // BEHAVIOR_TREE_VIEW
|
||||||
|
|
||||||
|
#endif // TOOLS_ENABLED
|
|
@ -168,8 +168,6 @@ void initialize_limboai_module(ModuleInitializationLevel p_level) {
|
||||||
GDREGISTER_CLASS(BBVector3Array);
|
GDREGISTER_CLASS(BBVector3Array);
|
||||||
GDREGISTER_CLASS(BBVariant);
|
GDREGISTER_CLASS(BBVariant);
|
||||||
|
|
||||||
GDREGISTER_CLASS(BehaviorTreeView);
|
|
||||||
|
|
||||||
_limbo_utility = memnew(LimboUtility);
|
_limbo_utility = memnew(LimboUtility);
|
||||||
GDREGISTER_CLASS(LimboUtility);
|
GDREGISTER_CLASS(LimboUtility);
|
||||||
|
|
||||||
|
@ -180,7 +178,10 @@ void initialize_limboai_module(ModuleInitializationLevel p_level) {
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
|
if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
|
||||||
EditorPlugins::add_by_type<LimboAIEditorPlugin>();
|
EditorPlugins::add_by_type<LimboAIEditorPlugin>();
|
||||||
|
} else if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||||
|
GDREGISTER_CLASS(BehaviorTreeView);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue