Justin,
I am getting the following annoying error and it causes my project to pause immediately, I have tried many things based upon your documentation and still get the error:
Error: Unable to set SharedVariable - the variable type BehaviorDesigner.Runtime.SharedString does not match the existing type BehaviorDesigner.Runtime.SharedGameObject
UnityEngine.Debug:LogError(Object)
BehaviorDesigner.Runtime.BehaviorSource:SetVariable(String, SharedVariable)
BinaryDeserialization:BytesToSharedVariable(FieldSerializationData, Dictionary`2, Byte[], Int32, IVariableSource, Boolean, Int32)
BinaryDeserialization:LoadField(FieldSerializationData, Dictionary`2, Type, String, Int32, IVariableSource, Object, FieldInfo)
BinaryDeserialization:LoadFields(FieldSerializationData, Dictionary`2, Object, Int32, IVariableSource)
BinaryDeserialization:LoadTask(TaskSerializationData, FieldSerializationData, List`1&, BehaviorSource&)
BinaryDeserialization:Load(TaskSerializationData, BehaviorSource)
BehaviorDesigner.Runtime.BehaviorSource:CheckForSerialization(Boolean, BehaviorSource)
BehaviorDesigner.Runtime.Behavior:CheckForSerialization()
BehaviorDesigner.Runtime.Behavior:GetVariable(String)
I have enclosed a snippet of the code that is causing the issue:
var fleeSourceGameObjectBT = (SharedGameObject)behaviorTreeVariables.behaviorTree.GetVariable ("fleeSourceGameObject");
fleeSourceGameObjectBT = behaviorTreeVariables.fleeSourceGameObject;
behaviorTreeVariables.behaviorTree.SetVariable ("fleeSourceGameObject", fleeSourceGameObjectBT);
public class BehaviorTreeVariables{
public BehaviorTree behaviorTree;
public SharedGameObject fleeSourceGameObject;
I have no clue and this is definitely hindering my current project. I cannot find anything in your documentation that helps this issue or even on youtube or google. The value is being assigned in the external behavior tree so the message makes no sense to me.
please point me in the direction of how to fix/troubleshoot this issue or documentation that will clearly explain how to pass and get shared variables/gameobjects(non-global) from a unity script to a behavior designer behavior tree so that I will not have to keep on going through this aggravation. Any help is greatly appreciated.
I am getting the following annoying error and it causes my project to pause immediately, I have tried many things based upon your documentation and still get the error:
Error: Unable to set SharedVariable - the variable type BehaviorDesigner.Runtime.SharedString does not match the existing type BehaviorDesigner.Runtime.SharedGameObject
UnityEngine.Debug:LogError(Object)
BehaviorDesigner.Runtime.BehaviorSource:SetVariable(String, SharedVariable)
BinaryDeserialization:BytesToSharedVariable(FieldSerializationData, Dictionary`2, Byte[], Int32, IVariableSource, Boolean, Int32)
BinaryDeserialization:LoadField(FieldSerializationData, Dictionary`2, Type, String, Int32, IVariableSource, Object, FieldInfo)
BinaryDeserialization:LoadFields(FieldSerializationData, Dictionary`2, Object, Int32, IVariableSource)
BinaryDeserialization:LoadTask(TaskSerializationData, FieldSerializationData, List`1&, BehaviorSource&)
BinaryDeserialization:Load(TaskSerializationData, BehaviorSource)
BehaviorDesigner.Runtime.BehaviorSource:CheckForSerialization(Boolean, BehaviorSource)
BehaviorDesigner.Runtime.Behavior:CheckForSerialization()
BehaviorDesigner.Runtime.Behavior:GetVariable(String)
I have enclosed a snippet of the code that is causing the issue:
var fleeSourceGameObjectBT = (SharedGameObject)behaviorTreeVariables.behaviorTree.GetVariable ("fleeSourceGameObject");
fleeSourceGameObjectBT = behaviorTreeVariables.fleeSourceGameObject;
behaviorTreeVariables.behaviorTree.SetVariable ("fleeSourceGameObject", fleeSourceGameObjectBT);
public class BehaviorTreeVariables{
public BehaviorTree behaviorTree;
public SharedGameObject fleeSourceGameObject;
I have no clue and this is definitely hindering my current project. I cannot find anything in your documentation that helps this issue or even on youtube or google. The value is being assigned in the external behavior tree so the message makes no sense to me.
please point me in the direction of how to fix/troubleshoot this issue or documentation that will clearly explain how to pass and get shared variables/gameobjects(non-global) from a unity script to a behavior designer behavior tree so that I will not have to keep on going through this aggravation. Any help is greatly appreciated.