I’m trying to get a private static field of the ButtonEditor Unity class using reflection, but apparently it’s failing because the FieldInfo object returned is null.
var showNavigation = typeof(ButtonEditor).GetField("s_ShowNavigation", BindingFlags.NonPublic | BindingFlags.Static);
Debug.Log(showNavigation != null); // Prints false
I tried doing the same thing but on a private static field on a class that I derived from ButtonEditor and it works properly.
How do I make this work?