Bug in fsEnumConverter.TrySerialize

Forums 💬 NodeCanvas ⚙️ Support Bug in fsEnumConverter.TrySerialize

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16833
    colinrullko
    Participant

      There’s a bug at line 39 of fsEnumConverter.cs:

      bool isSet = (instanceValue & integralValue) != 0;

      should be

      bool isSet = (instanceValue & integralValue) == integralValue;

      The effect of this is that function arguments will be wrong in the generated json. For example, try setting Rigidbody2D.constraints to RigidbodyConstraints2D.FreezeRotation via the Set Property (mp) ActionTask, and then enter play mode. The argument will spontaneously change to RigidbodyConstraints2D.Everything.

      #16834
      Gavalakis
      Keymaster

        Hello,

        Thanks a lot for the fix! Nice find 🙂

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