BlackboardPlan
Inherits:
Stores and manages variables that will be used in constructing new Blackboard instances.
Properties
bool |
|
Methods
create_blackboard ( Node node, Blackboard parent_scope=null ) |
|
get_base_plan ( ) const |
|
Callable |
get_parent_scope_plan_provider ( ) const |
bool |
is_derived ( ) const |
void |
populate_blackboard ( Blackboard blackboard, bool overwrite, Node node ) |
void |
set_base_plan ( BlackboardPlan blackboard_plan ) |
void |
set_parent_scope_plan_provider ( Callable callable ) |
void |
Property Descriptions
bool prefetch_nodepath_vars = true
void set_prefetch_nodepath_vars ( bool value )
bool is_prefetching_nodepath_vars ( )
Enables or disables NodePath
variable prefetching. If true
, NodePath
values will be replaced with node instances when the Blackboard is created.
Method Descriptions
Blackboard create_blackboard ( Node node, Blackboard parent_scope=null )
Constructs a new instance of a Blackboard using this plan. If NodePath
prefetching is enabled, node
will be used to retrieve node instances for NodePath
variables and substitute their values.
BlackboardPlan get_base_plan ( ) const
Returns the base plan. See is_derived.
Callable get_parent_scope_plan_provider ( ) const
Returns the parent scope plan provider - a callable that returns a BlackboardPlan.
bool is_derived ( ) const
Returns true
if this plan is derived from another, i.e., the base plan is not null
. A derived plan can only contain variables that are present in the base plan, and only variable values can be different.
void populate_blackboard ( Blackboard blackboard, bool overwrite, Node node )
Populates blackboard
with the variables from this plan. If overwrite
is true
, existing variables with the same names will be overwritten. If NodePath
prefetching is enabled, node
will be used to retrieve node instances for NodePath
variables and substitute their values.
void set_base_plan ( BlackboardPlan blackboard_plan )
Sets the base plan. If assigned, this plan will be derived from the base plan.
Use with caution, as it will remove variables not present in the base plan. Only use this for custom tooling.
void set_parent_scope_plan_provider ( Callable callable )
Sets the parent scope plan provider - a callable that returns a BlackboardPlan. Used to provide hints in the inspector. When set, mapping feature becomes available.
void sync_with_base_plan ( )
Synchronizes this plan with the base plan: removes variables not present in the base plan, and updates type information. Only use this for custom tooling.