I have created a SharedVariable which cannot be accessed in runtime. My sample codes are as below:
1.
SharedVariable var = behaviorTree.GetVariable("target");
var.SetValue(gameObject);
2.
behaviorTree.SetVariable("target", (SharedGameObject)gameObject);
3.
behaviorTree.SetVariableValue("target", (SharedGameObject)gameObject);
All three of them are unsuccessful, please advise thanks.
1.
SharedVariable var = behaviorTree.GetVariable("target");
var.SetValue(gameObject);
2.
behaviorTree.SetVariable("target", (SharedGameObject)gameObject);
3.
behaviorTree.SetVariableValue("target", (SharedGameObject)gameObject);
All three of them are unsuccessful, please advise thanks.