Small bug in AstarEnumFlagDrawer

So technically not your bug, but I’ve been using your drawer with other Enum bitmask/flags in our project. However, with current implementation, you cannot use it with a private/protected field marked as [SerializeField] , since the GetFieldInfo is using default bindings, which won’t get the proper value.

Fix is to add in binding flags at line 43 in AstarEnumFlagDrawer.cs, as follows:

FieldInfo fieldInfo = reflectionTarget.GetType().GetField(path , BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);

Just throwing it out there for anyone that needs it.

1 Like

Thanks.
I have included this in my local dev version now.