Proper way to execute a graph immediately on-demand

NodeCanvas Forums Support Proper way to execute a graph immediately on-demand

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11677
    bcristian
    Participant

    Hello

    I need to implement the functionality of calling procedures, that start executing immediately.
    The paradigm I’ve been using so far is to have the “procedure” as a GameObject with an ActionListPlayer, and the “call” is an action to execute the Play method of the ALP (completes immediately, regardless of how long the actions take), or my ExecuteAction extension if the caller wants to wait for action completion.
    In turn, the procedure’s body would be implemented either as a simple list of actions in the ALP, or the ALP object would also contain a BT, and the ALP would contain an “Implemented Action (mp)” over BehaviourTreeOwner.Tick. Using the ALP in both cases is so that the caller does not need to know the implementation details.

    The problem I’m facing, and which AFAIK did not exist in the previous version, is that graphs set to do nothing onEnable seem to not be initialized properly – references to global BB variables comes up null.

    Any advice on this? Is the seemingly missing initialization a bug? Is there a better way to go about the whole thing?

    P.S. cannot use GraphOwnerControl, because it has a one-frame delay.

    #11683
    Gavalakis
    Keymaster

    Hey,

    What do you mean by saying that references to global blackboard variables come up null?
    Do you mean that the variable value in runtime results to null, or that in editor it looks like this after a Unity script re-compile:
    GlobalBBnameReference

    If the 2nd, then to fix it, please open up GlobalBlackboard.cs and add this piece of code by the end:

    Let me know if that is indeed the issue, or if I misunderstood it.
    Thanks.

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

    Attachments:
    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.