SetEnum node becoming broken when bound to global BB

Forums 💬 NodeCanvas ⚙️ Support SetEnum node becoming broken when bound to global BB

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18098
    zsoik
    Participant

      We made an unfortunate arrangement that broke the Node editor (i.e. we can no longer edit the node in question because of the exceptions):

      The BBParameter on SetNode is bound to a global blackboard variable, which itself is bound to a field on a component (which is NOT an enum type, but something other, DateTime if I remember correctly).
      The Canvas editor looks good until I instantiate the global blackboard into the scene, at which time the BB parameters on the graph get bound to that blackboard and then the type mismatches start throwing those exceptions. I have no idea why the DateTime variable could be chosen for a Enum-type parameter at first.

      #18102
      Gavalakis
      Keymaster

        Hey,
        Thanks for the report. I was able to reproduce the problem and found the cause. To fix this, please open up Variable.cs and in method named GetGetConverter, replace the check code in lines 106-110 with the following:

        Let me know if it works for you.
        Thanks.

        #18101
        zsoik
        Participant

          Looks like it works, the exceptions are gone and I can edit the node again! Thanks for the quick fix!

          #18100
          zsoik
          Participant

            Okay I think the fix broke other parts in our FSMs that previously worked. E.g. there was a SendEvent<string> Action where the EventValue type was not a string, but an integer. That worked previously but after applying the fix the receiver just gets NULL as the string parameter from the event.
            Inspector should warn in such cases at least.
            For now it seems we have too many places where it already works without the hotfix, but with the hotfix, everything gets broken 😉

            #18099
            Gavalakis
            Keymaster

              Hey,
              Sorry about that. It was a wrong fix on my part because it excluded string auto conversions. Please replace the code once again with this temporary fix (I will fix this better in release):

              Please let me know if everything works correctly this time.
              Thank you.

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