FindTask throw NullReferenceException

okokok126

New member
Every time I call FindTask it will throw NullReferenceException.

Following is my code and behavior tree setting


C#:
using UnityEngine;
using BehaviorDesigner.Runtime;
using BehaviorDesigner.Runtime.Tasks;

public class TreeTester : MonoBehaviour
{
    public BehaviorTree tree;

    void Start ()
    {
        Wait wait = tree.FindTask<Wait>();
        wait.waitTime = 2;
    }
}


Image 002.png

Image 001.png

Unity Version : 2018.2.17f1
BehaviorDesigner Version : 1.6

Please help me to solve this problem, thanks.
 
Thanks - this is an issue with the current version of BD. I have it fixed and will be sending you a new version.
 
Top