Can't change value of enums in array and can't change enum field on any object inside an array

Issue #120 resolved
Former user created an issue

The arrays I tested are exposed with the [OdinSerialize] tag inside a SerializedMonoBehaviour. It seems that enums can't be changed in the inspector as soon as they are in some way contained in an array, no matter how nested.

None of the enums below can be changed from the inspector:

[OdinSerialize] SomeEnum[] enums;
[OdinSerialize] SomeClassThatContainsAnEnum[] objects;

Where the class is:

class SomeClassThatContainsAnEnum {
    [OdinSerialize] SomeEnum anEnum; 
}

Comments (2)

  1. John Ploskey

    Hey, this is the guy who posted this. Just found out this is actually not limited to arrays.

    This has the same issue:

    [OdinSerialize] SomeClassThatContainsAnEnum example;
    

    However, I also discovered that every time this issue occurs it occurs when inspecting a prefab instance. As soon as I apply the instance to the prefab I am able to change the values of the enums.

  2. Bjarke Elias

    Hi John,

    Thanks for the bug report!

    We've fixed the issue and we'll be submitting the patch to the Asset Store very soon. Likely today if everything goes as planned. Hopefully, Unity will approve the patch during the next week.

  3. Log in to comment