CylinderPanel cant change button materials

Hi ,

I need to change each button backMaterial depending on if even number of odd number but if i change material of one button all of them change and if i use “new FluentMaterial()” or clone() it , the button loses previous styling

I have a playground

As you can see all buttons are blue in the playground

it was a long issue to find but i fixed it now lol
by adding the following
button._shareMaterials = false;
in front of panel.addControl(button)

_shareMaterials is a private property, you should not use it: it’s not guaranteed to always exist in future releases.

You should instead pass false as the second parameter for the HolographicButton constructor, which means you don’t want to share materials between buttons:

1 Like

Thank you , that did not see that in constructor