When prefetch fails, don't print error if variable is on blackboard
This commit is contained in:
parent
b09006a11b
commit
e2edb083ff
|
@ -284,8 +284,11 @@ inline void bb_add_var_dup_with_prefetch(const Ref<Blackboard> &p_blackboard, co
|
||||||
if (n != nullptr) {
|
if (n != nullptr) {
|
||||||
var.set_value(n);
|
var.set_value(n);
|
||||||
} else {
|
} else {
|
||||||
|
// Print error only if the variable is not present (it can be initialized by the user or in the parent scope).
|
||||||
|
if (!p_blackboard->has_var(p_name)) {
|
||||||
ERR_PRINT(vformat("BlackboardPlan: Prefetch failed for variable $%s with value: %s", p_name, p_var.get_value()));
|
ERR_PRINT(vformat("BlackboardPlan: Prefetch failed for variable $%s with value: %s", p_name, p_var.get_value()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
p_blackboard->add_var(p_name, var);
|
p_blackboard->add_var(p_name, var);
|
||||||
} else {
|
} else {
|
||||||
p_blackboard->add_var(p_name, p_var.duplicate());
|
p_blackboard->add_var(p_name, p_var.duplicate());
|
||||||
|
|
Loading…
Reference in New Issue