Reply To: Problem about your json parser

Forums 💬 NodeCanvas ⚙️ Support Problem about your json parser Reply To: Problem about your json parser

#17861
jjr2930
Participant

    1. restart editor
    2. open profiler(click deep profiler)
    3. Create new Behaviour Tree (it’s name is BehaviourTree)
    4. add this component to any gameobject in scene
    5. play, and click “HI” button

    if you want video, I will create

    using NodeCanvas.BehaviourTrees;
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    [RequireComponent(typeof(BehaviourTreeOwner))]
    public class LoadBT : MonoBehaviour {

    public void OnGUI()
    {
    if ( GUILayout.Button( “HI” ) )
    {
    var loaded = (BehaviourTree)Resources.Load( “BehaviourTree” );
    GetComponent<BehaviourTreeOwner>().SwitchBehaviour( loaded );
    }
    }
    }