In this example we use the Human UI plugin for grasshopper to obtain the names of all layers in a Rhino document and create a button for each that toggles the visibility of any one layer at a time.
Creating Textures for Buttons
We use the same method as the previous example creating buttons for each layer in our document.
Toggling Layer Display by Name
We use the Track Clicks component to detect the names of any objects we have clicked on in the mixed reality experience, then use a custom c# component to iterate over layers in the Rhino document and toggle their visibility property. Any layers with names matching that of the clicked object will be turned on, with all other layers (other than the current layer) turned off.