NC2 – Custom actions are forgotten

Forums 💬 NodeCanvas ⚙️ Support NC2 – Custom actions are forgotten

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #19287
    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.

      #19296
      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

        #19295
        matt-newcombe
        Participant

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

          #19294
          matt-newcombe
          Participant
            #19293
            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,

              #19292
              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

                #19291
                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

                  #19290
                  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).

                    #19289
                    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

                      #19288
                      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.