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
Login
Register
By registering on this website you agree to our Privacy Policy.