Can't use SharedVariables in custom tasks when using assembly definitions

archer3cl

New member
As stated in the title if I have a custom task script inside a folder with an assembly definition, I'm not able to reach the SharedVariable classes (such as SharedInt, SharedBool, etc)

  • Everything inside the "using BehaviorDesigner.Runtime.Tasks;" (like using the Action class or the TaskStatus enum) works just fine.
  • If I move my folder outside the assembly definition I can reach the SharedVariable classes.
  • If I use the runtime source, this problem does not exist, but it makes my project crash constantly (Unity 2022.1.6f1)
BehaviorDesigner version 1.7.3

Any help is appreciated
 
You should store your custom tasks outside of the Behavior Designer directory. From there you can create a new Assembly Definition and reference Behavior Designer from it.
 
  • I'm storing my custom tasks outside of the Behavior Designer directory
    • Screenshot 2022-07-21 013534.png
  • I can't reference Behavior Designer inside the Assembly Definition
    • 1658385449168.png
 
If you are using the Asset Store version of Behavior Designer it's not in an Assembly Definition. The runtime source version is.
 
Thanks for reaching out, but I still don't have an answer for the original issue

"I have a custom task script inside a folder with an assembly definition, I'm not able to reach the SharedVariable classes (such as SharedInt, SharedBool, etc)"

Does your last comment indicates that it is not possible to use assembly definitions with the Asset Store version of Behavior Designer?
 
You can use it - I am doing it within the character controller integration. This sounds like it could be a Unity issue that I am not aware of - I would try posting on the Unity forum to see if anybody else has run into this.
 
Top