Hey,
You can if you want, also directly get the Blackboard component attached on the gameobject as well, without the need to go through the FSMOwner, since Blackboard is but a component.
You can then indeed use SetValue and GetValue to get/set any variable on that blackboard.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
usingUnityEngine;
usingNodeCanvas.Framework;
publicclassExample:MonoBehaviour{
voidDo(){
varbb=GetComponent<Blackboard>();
varvalue=bb.GetValue<bool>("myBool");
value=!value;
bb.SetValue("myBool",value);
}
}
Cheers!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.