BindingFlags.FlattenHierarchy

NodeCanvas Forums General Discussion BindingFlags.FlattenHierarchy

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11918
    bcristian
    Participant

    Hello

    This should be included when enumerating static fields/properties, without it members created with the following pattern are not seen:

    So far, I’ve identified 2 places where the flag needs to be added:
    in ReflectionTools.cs
    private const BindingFlags flagsEverything = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy;
    and in EditorUtils_ContextMenu.cs, at GetStaticFieldSelectionMenu and GetStaticPropertySelectionMenu

    Please let me know if you agree to this, and if there are more places I whould add it.

    #11922
    Gavalakis
    Keymaster

    Hello,

    Thanks for the suggestion. Yes this does makes sense and nothing wrong about adding it as far as I can tell.
    There is no other place that this would need to be added other than ReflectionTools and EditorUtils_ContextMenus, so everything will be good to go with these 2 files changed 🙂

    I will also make this change in next version.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

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