Unity 6
6000.0.26f1
Behavior Designer Pro - DOTS Powered Behavior Trees
2.0.12 · June 28, 2025
and all updated DOTS Powered Behavior Trees AddOns
I made some BT for my Bot and testet them and some scripts for some days.
I made some Shared Scene Variables for my needs and was able to access them (Read/Write) via Mono Scripts too.
Suddenly I can't update my Variables in Tree anymore. Still I can read them out.
I was updating to newest version of BDPro and the Addons yesterday but I don't think that this will be the reason,
sure I did something I can't find for now. So I'm lost in space and need an advice.
What could be wrong if I can access the Scene Variables, read them out but can't write to them anymore?
//-------------------------------------------------------------------------------------------------------------------------------------
public string OurBotHealth; // => "BotMechHealth";
public enum VariablesScopes : byte
{
Self,
Empty,
Graph,
GameObject,
Scene,
Project,
Dynamic,
Subgraph
}
//-------------------------------------------------------------------------------------------------------------------------------------
void CheckOurHealth()
{
var sharedHealthVariable = (SharedVariable<int>)behaviorTree.GetVariable(OurBotHealth, (SharedVariable.SharingScope)variablesScopes);
if (sharedHealthVariable != null)
{
Health = sharedHealthVariable.Value; // this works, I can get the health from tree
Health = transform.GetComponent<EmeraldHealth>().Health; // this works too
sharedHealthVariable.Value = Health; // Both variants here do not work
behaviorTree.SetVariableValue(OurBotHealth, Health); //
}
}
6000.0.26f1
Behavior Designer Pro - DOTS Powered Behavior Trees
2.0.12 · June 28, 2025
and all updated DOTS Powered Behavior Trees AddOns
I made some BT for my Bot and testet them and some scripts for some days.
I made some Shared Scene Variables for my needs and was able to access them (Read/Write) via Mono Scripts too.
Suddenly I can't update my Variables in Tree anymore. Still I can read them out.
I was updating to newest version of BDPro and the Addons yesterday but I don't think that this will be the reason,
sure I did something I can't find for now. So I'm lost in space and need an advice.
What could be wrong if I can access the Scene Variables, read them out but can't write to them anymore?
//-------------------------------------------------------------------------------------------------------------------------------------
public string OurBotHealth; // => "BotMechHealth";
public enum VariablesScopes : byte
{
Self,
Empty,
Graph,
GameObject,
Scene,
Project,
Dynamic,
Subgraph
}
//-------------------------------------------------------------------------------------------------------------------------------------
void CheckOurHealth()
{
var sharedHealthVariable = (SharedVariable<int>)behaviorTree.GetVariable(OurBotHealth, (SharedVariable.SharingScope)variablesScopes);
if (sharedHealthVariable != null)
{
Health = sharedHealthVariable.Value; // this works, I can get the health from tree
Health = transform.GetComponent<EmeraldHealth>().Health; // this works too
sharedHealthVariable.Value = Health; // Both variants here do not work
behaviorTree.SetVariableValue(OurBotHealth, Health); //
}
}