Editor: Selectables Navigation section Visualize button, how do I get the state?

If you add any Selectable derived class object (eg Button) to your scene, and select it, you will see in the inspector (among other things) it’s UI navigation settings. At the bottom of this section is visualize button. If you click this button, it toggles a display of navigation arrows, in the scene view.

Interestingly, the state of the toggle does NOT change, even if you click a different Selectable object. It only changes when you click the button, on ANY Selectable derived object.

How can I determine & possibly change the state of this/these “Visualize” button(s), in a custom editor script?


from: SelectableEditor source code - not sure how well this link will work