NC2 – Custom actions are forgotten

NodeCanvas Forums Support NC2 – Custom actions are forgotten

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #9816
    Matt Newcombe
    Participant

    Hi There,

    I’ve just tried out upgrading to NC2, removing all previous NodeCanvas scripts/support assets, deleting my pre-existing graphs and refactoring my custom actions/conditions. The issue I’m currently having is the following:

    – I have my re-factored actions
    – I create a new FSM and setup a single action state with my CustomAction
    – The graph can be authored without any issues
    – I hit play, and immediately the NC FSM Graph ‘loses’ my custom action.
    – After I exit play mode, the graph still has lost my action

    To example exactly what I mean by ‘lose’ please check the attached screen grab.

    Note if I re-author the graph by removing this action and re-adding it, it once again appears fine until I hit play, at which point it again loses the action.

    #9825
    Gavalakis
    Keymaster

    Hello Matt,

    Do the included actions work fine, except your own?
    Does this happen to all of your actions or just this one?
    Do you get any warnings or errors?

    Thanks for your answers in advance.

    Gavalakis Vaggelis

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

    #9824
    Matt Newcombe
    Participant

    No warnings or errors.
    Included actions work fine.
    This happens to all of my custom actions.

    #9823
    Matt Newcombe
    Participant
    #9822
    Matt Newcombe
    Participant

    Creating a clean project from scratch and re-creating this test action works fine so perhaps it’s something conflicting in my pre-existing 1.6 project that I haven’t cleaned properly.

    I’m going to try it from fresh again perhaps I missed something in the cleanup, I’ll let you know how I get on soon,

    #9821
    Gavalakis
    Keymaster

    That seems so weird since of course there is no special treating to the included ones.
    Can you please confirm and let me know if it works fine in a new test project?

    Thanks

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

    #9820
    Gavalakis
    Keymaster

    Oh you got me first 🙂

    Yeah possibly something didnt clean up well.
    Maybe there are some actions still in there with same name but different namespace?
    Please let me know.

    Thanks

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

    #9819
    Matt Newcombe
    Participant

    Doing a clean from scratch sorted it out, I’m not exactly sure what I missed previously, but all’s good.

    On an upgrade note, I use

    protected override string OnInit()

    In some conditions, however this function no longer seems to be called, I was wondering if there is an alternative to do some condition ‘state setup’ that I require. (Specifically I have a condition that listens for a game event, the listener is attached in the OnInit, then when the callback is received it yield returns).

    #9818
    Gavalakis
    Keymaster

    Hey,

    Glad to know its all sorted out. By they way there was another (irelevant) deserialization bug I’ve found which fix is not in the version I’ve send to some of you but it’s of course in the submited version. I’d recomend you wait asset store release before commiting to some work or I can resend it to you of course.

    With that said and regarding OnInit,
    OnInit and other attribute related initialization is not done in tasks that do not define an AgentType (either with the attribute [AgentType] or with using the generic version of the task eg: : ActionTask ).
    This is simply done for performance, but I had this request from other people as well, so I may revert it to call initialization anyway.

    Here are the 2 option for now:
    1. Define an AgentType if that is indeed needed, which at least in my case, most if not all tasks requiring some initialization were also using an AgentType definition.
    2. Open up Task.cs and in method ‘Set’ remove lines #323-324:

    Dont worry about doing this since I will also do it in one way or another due to request.

    Thanks

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

    #9817
    Matt Newcombe
    Participant

    Thanks! That sorted it

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