The behavior contains no root task

Alinouski

New member
Hello, I need help integrating this asset.

I created a tree of external behavior and successfully integrated it into my game. Everything works fine, but when I run it on Android devices it doesn’t work.

In logcat, I see the following line “Behavior“ Behavior ”in GameObject“ Enemy (Clone) ”does not contain the root task. This behavior will be disabled. ” this happened when I instantiated the module. After learning only the tips that I discovered, it is “Enable JSON serialization,” but the same error anyway.

Screenshot_3.png
I use this tree for tests.
I test this component without attaching an external tree, but the result is the same.

Unity version is 2019.4LTS
 
Last edited:
That error indicates that the Behavior Tree component can't find the task data. To start debugging I would not use an external tree to reduce the number of things that can go wrong.

Are you get any other errors? If you create a brand new scene with just the wait task does it work correctly?
 
I tried this tip, but there is also an error.

BrandNewScene_bd.png

Code:
 The behavior "Behavior" on GameObject "GameObject" contains no root task. This behavior will be disabled.
 BehaviorDesigner.Runtime.BehaviorManager:EnableBehavior(Behavior)
 
If you disable all stripping does it work? I just tested a similar tree on Android and didn't get any errors.
 
I was also having this issue with managed code stripping affecting the builds.
If you want to keep your project at High striping level. Making sure to use the [UnityEngine.Scripting.Preserve] attribute on Custom Nodes, and making sure to add the BehaviorDesigner.Runtime.Tasks namespace to link.xml in the project, seemed to prevent the issue.
Code:
<linker>
<assembly fullname="Assembly-CSharp">
    <namespace fullname="BehaviorDesigner.Runtime.Tasks" preserve="all" accessors="all" />
  </assembly>
</linker>
 
Top