Any way to define a navigation group with the UI system?

I’ve come into a problem that seems too obvious not to exist as default behaviour.

Is there any way that i can have a CanvasGroup with a bunch of Selectable childs and restrict navigation between those child elements alone? Much like the automatic navigation type that selectables have available by default but being able to explicitly tell them to only navigate between those child elements.

For instance being able to activate a panel with dynamic buttons that are instanced based on a number of objects, and have them automaticaly only navigate between them and not navigate automaticaly to objects outsite of their shared parent or CanvasGroup.


I use the “interactable” property of the Canvas Group to achieve this. Here are a few images to illustrate: Unity UI Dynamic Navigation - Album on Imgur

You may need to add do some engineering to get it consistent. I use a static LinkedList on my menu class which stores all menus at the class level. Then, I have it set all menus to not be interactable before setting the current active menu to interactable.