Support for enum flags and values

Hello, it seems that enum flags and enums with assigned values don’t work properly now.

When I have a following enum and set BlackboardVariable<FlagTest> FlagTestVar to C in the inspector, the FlagTestVar.Value returns a flag with A and B as a result, so the underlying value is 3. Seems like it doesn’t account for assigned values to each enum field.
Adding [BlackboardEnum] attribute doesn’t change anything.

    [System.Flags]
    public enum FlagTest
    {
        None = 0,
        A = 1,
        B = 2
        C = 4,
    }

Hi

Thanks for the report, i’ll have a play with this now.

Thanks,

Ok i can reproduce this even without the System.Flags attribute. I’m going to investigate now.

Thanks,

Hi,

I have a fix for this up for review. I discovered that the value being assigned to the variable is the index of the item in the dropdown and the field values were ignored as you described.

It sounds like we’re talking about the same issue and hopefully it will be included in this week’s release.

Thanks,