This should be included when enumerating static fields/properties, without it members created with the following pattern are not seen:
1
2
3
4
5
6
7
8
classB<T>whereT:B<T>
{
publicstaticTProp{get;protectedset;}
}
classC:B<C>{}
// C.Prop, of type C, will not be seen without BindingFlags.FlattenHierarchy
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.
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
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.