Hi! I would like to ask if there is a feature where you have your own monobehaviour script and you want to do data binding to a global blackboard variable or any blackboard? Thanks!
Can you please explain a bit more of what you mean? Sorry.
Blackboard variables can be data bound to component properties of the same gameobject as the gameobject the Blackboard is attached if that is what you mean yes 🙂 Take a look at this documentation section.
Let me know if you mean something different.
Thanks.
Nevermind, I found a solution for it. I retrieved the variable version of the blackboard properties to have a reference of the values instead of always getting it every update to see if there are changes.
Hey,
Thanks for letting me know.
Yes you can get and store the Variable object if you want. Also, that Variable object has an event you can subscribe to onValueChange. Here is an example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
publicclassExample:MonoBehaviour{
publicBlackboard bb;
voidStart(){
varvariable=bb.GetVariable("myFloat");
variable.onValueChanged+=OnValueChanged;
}
//name and new value of the variable changed.
voidOnValueChanged(stringname,objectvalue){
//...
}
}
Cheers!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.