Problem about your json parser

NodeCanvas Forums Support Problem about your json parser

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #12269
    jjr2930
    Participant

    When i load BehaviourTree asset(it have just one task), JSON Parser create so many memory garbage,

    this problem is so critical to me

    Can you optimize your parser?

    Or can you tell me solve this problem?

    Attachments:
    You must be logged in to view attached files.
    #12277
    Gavalakis
    Keymaster

    Hello and sorry for the late reply.
    This definitively looks something is going wrong here.
    It only takes 56kb here of that same tree, of which 43kb is all due to the Unity Log to Console.

    What version of NodeCanvas you are using?

    Join us on Discord: https://discord.gg/97q2Rjh

    #12303
    jjr2930
    Participant

    I use 2.6.3 version

    this situation is occurred when you first load Behaviour Tree..

    so if you can not see this situation, you must restart editor,

    and load Behaviour Tree asset

    you can not miss it

    #12305
    Gavalakis
    Keymaster

    Hello again,

    I am sorry, but no matter what I do, I can’t reproduce such a high allocation when the graph is loaded.
    How are you loading the graph exactly? Can you please copy/paste the code that you are using to load the graph?

    Thank you.

    Join us on Discord: https://discord.gg/97q2Rjh

    #12313
    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 );
    }
    }
    }

    #12316
    Gavalakis
    Keymaster

    Hello again,
    I just did your test exactly as provided and here are the results, which look quite good though:
    DeserializeTest

    What version of Unity are you using please?

    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #12322
    jjr2930
    Participant

    I use 5.6.1 p1

    #12325
    Gavalakis
    Keymaster

    I will test this out in this exact version Unity 5.6.1 p1 to confirm, and will let you know.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.