Merge pull request #261 from limbonaut/fix-crash-with-vscode-and-gdextension
Fix crash with VSCode and GDExtension
This commit is contained in:
commit
dddc713a3a
|
@ -35,7 +35,7 @@ void BTNewScope::_set_parent_scope_plan_from_bt() {
|
||||||
ERR_FAIL_NULL(get_blackboard_plan());
|
ERR_FAIL_NULL(get_blackboard_plan());
|
||||||
Ref<BehaviorTree> bt = get_root()->editor_get_behavior_tree();
|
Ref<BehaviorTree> bt = get_root()->editor_get_behavior_tree();
|
||||||
ERR_FAIL_NULL(bt);
|
ERR_FAIL_NULL(bt);
|
||||||
get_blackboard_plan()->set_parent_scope_plan_provider(callable_mp(bt.ptr(), &BehaviorTree::get_blackboard_plan));
|
get_blackboard_plan()->set_parent_scope_plan_provider(Callable(bt.ptr(), "get_blackboard_plan"));
|
||||||
}
|
}
|
||||||
#endif // TOOLS_ENABLED
|
#endif // TOOLS_ENABLED
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ void LimboState::set_blackboard_plan(const Ref<BlackboardPlan> &p_plan) {
|
||||||
blackboard_plan = p_plan;
|
blackboard_plan = p_plan;
|
||||||
|
|
||||||
if (Engine::get_singleton()->is_editor_hint() && blackboard_plan.is_valid()) {
|
if (Engine::get_singleton()->is_editor_hint() && blackboard_plan.is_valid()) {
|
||||||
blackboard_plan->set_parent_scope_plan_provider(callable_mp(this, &LimboState::_get_parent_scope_plan));
|
blackboard_plan->set_parent_scope_plan_provider(Callable(this, "_get_parent_scope_plan"));
|
||||||
}
|
}
|
||||||
|
|
||||||
_update_blackboard_plan();
|
_update_blackboard_plan();
|
||||||
|
@ -213,6 +213,8 @@ void LimboState::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &LimboState::set_blackboard_plan);
|
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &LimboState::set_blackboard_plan);
|
||||||
ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &LimboState::get_blackboard_plan);
|
ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &LimboState::get_blackboard_plan);
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("_get_parent_scope_plan"), &LimboState::_get_parent_scope_plan);
|
||||||
|
|
||||||
GDVIRTUAL_BIND(_setup);
|
GDVIRTUAL_BIND(_setup);
|
||||||
GDVIRTUAL_BIND(_enter);
|
GDVIRTUAL_BIND(_enter);
|
||||||
GDVIRTUAL_BIND(_exit);
|
GDVIRTUAL_BIND(_exit);
|
||||||
|
|
Loading…
Reference in New Issue