The specific initialization of global BB’s used to be in OnEnable (checking name uniqueness, registering in the list of global BB’s), while the common initialization (property bindings) was in the base Blackboard’s Awake.
But now the global’s initialization has been moved to Awake too, so the property bindings are never set up.
I’ve made the following changes, and it seems to be working now:
made Blackboard’s _blackboard field protected instead of private
add the binding initialization in Awake
Hey,
Thanks for letting me know! I missed that on my previous post with the GlobalBlackboard attached.
Probably a better solution would be to make Blackboard.Awake virtual and override it in GlobalBlackboard along with a call to base.Awake() likeso:
Blackboard.cs
1
2
3
4
5
6
virtualprotectedvoidAwake(){
//Call to bind the variables with respected properties on the target game object