hi
is it possible to use in a blackboard static defined fields in my program, with doing a strange sequence.
the structure in C#:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
publicclassDatabinding:SecondDATA{
publicboolisSelected;
voidStart(){
isSelected=false;
}
publicvoidonclick(){
isSelected=!isSelected;
Debug.Log("Sub: "+isSelected.ToString());
isBaseSelected=!isBaseSelected;
Debug.Log("Base: "+isBaseSelected.ToString());
}
}
publicclassSecondDATA:MonoBehaviour{
publicboolisBaseSelected;
}
in FSM make two nodes and connected with decision based on isSelected and another two nodes based on isBaseSelected, add the fields to the blackboard as a Databinding, And ofcourse create the button.
Wen clicked only ONE FSM is change to the other node (of course you have to change the start)
Then after changing the isBaseSelected to public static bool isBaseSelected it works on all/both FSM. But then the issue.
You cannot (re)assign the static isBaseSelected to another decision… with check boolean.
Is this by design and do i want something is not desirable.
all suggestions are welcome for a beter way to achieve the goal.
Considering I understood correctly, you can already use the Data Bind feature of blackboard variables, by data binding a blackboard variable to a static field. If you want that same static field used between multiple graphs, you can simply create a data bound variable to that field in each graph.
But, I think I completely misunderstood what you mean. I am sorry 🙂
I have no problems wit assigning the fields to the backboard with data binding, that is working perfect.
But adding one static field that can be used in more scripts and on that information do some actions / decission on one FSM Graph.
This static field is only to add to the blackboard with databinding with the sequence:
First add the field without static to the backboard with databinding, and then add the static to the field in the script.
Result: the FSM is acting on all changes of the static field on all script.
After the sequence the field can not be added to again other FSM’s.
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.