Behavior contains a null task from referenced from parent task repeater?

kingmob

New member
Having a weird issue on some trees I just added to three different AI characters. They are copined from the orginal AI but have been saved to their own external behvaior tree. They work fine in editor without having async checked, but in the build it ends up crashing seemingly whenever they start moving. If you enable async in editor it pops up the error in the console shown below, but the weirdest part is when I go to look at the tree, it's from a tree that I haven't used in about a year. It's missing tasks which were from the UCC but I found it a bit too much for my game (still great though) so I then built a tree around my system. As you can see in the images in play mode it's loading in this old version of this tree and I can't figure out why. I've gone through all the external trees in my project and none of them have any references to this tree that's showing up in play mode. Meanwhile I have a pool of about 50 enemies with a different external tree that load and run fine in editor and in build.

Super weird but hopefully someone here can make heads or tails of it. Thanks!
 

Attachments

  • btErrorNoAsync.png
    btErrorNoAsync.png
    526.9 KB · Views: 9
  • btError.png
    btError.png
    438.3 KB · Views: 9
  • behaviorError.png
    behaviorError.png
    548.9 KB · Views: 8
Those tasks in the error version are for sure action events from the ultimate character controller tasks, which have all been removed from my project.
 
I'm not sure why async load would effect this but when you assign an external tree it doesn't destroy the local tree. To completely clear it out you could create a new Behavior Tree component and then assign the external tree, or unassign the external tree and remove any tasks that are currently there.
 
So that cleared it out and stopped it from loading that old one but I'm still getting this error


The behavior "Behavior" on GameObject "DavyAimerIK (1)" contains a null task (referenced from parent task Sequence (index 0)). This behavior will be disabled. (at ?)
UnityEngine.Debug:LogError(Object) (at ?) (at ?)
BehaviorDesigner.Runtime.BehaviorManager:LoadBehaviorComplete(Behavior, BehaviorTree) (at ?) (at ?)
BehaviorDesigner.Runtime.<CheckThreadLoaders>c__Iterator0:MoveNext() (at ?)


This only appears when using async load, unchecked it runs fine.
 
It looks like it's still caching the old tree. Have you tried creating a new behavior tree component and then assigning it from there?
 
Yeah I've created a new behavior tree component and then loaded the external tree, it got rid of the cached tree from a year ago but it's still giving the async error. The only thing I haven't done is completely rebuild the tree, but not sure if that's necessary. The main issue I was having where the tress would crash in build seems to be gone now though so I can live with the async error for now. If I get more detailed steps in the future I will post them here. Thanks for the help.
 
Top