Hi @LeXXik, this is exactly how you have interpreted it, Beige a button element that has many other buttons as children. It’s the best way I can imagine to solve a hierarchy problem, but it’s probably misfocused. I will try to explain a little how I want the button system and its hierarchy to work, I hope it is clear enough and you can understand it and give me your opinion:
The “TOP BASE A”, “TRIM STRIPE B”, “TRIM STIPE C” and “TRIM STRIPE D” buttons are main buttons that select a specific part of the plane in which we want to apply a certain range of color (beige, yellow, red, gray, purple, green and black), then what I have thought is that the beige, yellow, red, gray, purple, green and black buttons are secondary / children of each
button “TOP BASE A”, “TRIM STRIPE B”, “TRIM STIPE C” and “TRIM STRIPE D”. In turn, each button that defines a color range (beige,
yellow, red, gray, purple, green and black) when pressed, it must display a set of buttons with multiple colors that correspond to the chosen color range. In other words, if you press the “beige” button, a variety of beige tones are displayed that will only be applied to the part of the plane previously chosen with the “TOP BASE A”, “TRIM STRIPE B”, “TRIM STIPE C” and "TRIM buttons. STRIPE D ". Actually, the buttons that change the colors are those of the third level, that is, the ones that are displayed when you press the button corresponding to the color range you choose.
If you remember a post of mine from a few weeks ago, I told you that I wanted to write a script that could work with hierarchies.
Well it was just for this project.
I determined that it would be too complex and tedious to have all the buttons on the same level of the scene tree, if I do it from this
way I imagine dozens of scripts that control each one to a button. So I thought about putting the buttons together like a tree in the scene:
The buttons “TOP BASE A”, “TRIM STRIPE B”, “TRIM STIPE C” and “TRIM STRIPE D” would be the trunk of the tree, the buttons “beige”, “yellow”, “red”, “gray”, " violet “,” green “and” black "would be the branches, and the colored buttons for each range would be the leaves. By doing this
So I imagine a single script (or as few as possible) that can control each tree indicating parent / child functions as I am trying to achieve. I hope you have understood what I am trying to achieve.
The perfect script should say something like this:
First event / function:
When the “TOP BASE A” button is pressed, the “beige”, “yellow”, “red”, “gray”, “violet”, “green” and “black” buttons that correspond to the “TOP BASE A” button should be displayed and keep hidden the" beige “,” yellow “,” red “,” gray “,” purple “,” green “and” black “buttons corresponding to the” TRIM STRIPE B “,” TRIM STIPE C " and " TRIM STRIPE D " button.
Second event / function:
When the “Beige” button is pressed corresponding to of the “TOP BASE A” button that was pressed / selected in the first event / function, all the color buttons (Beige Color Range) corresponding to the “Beige” button must be shown and all the color range buttons corresponding to the buttons called “yellow”, “red”, “gray”, “purple”, “green” and “black” must be kept hidden
Third event / function:
When is press some color button in the beige range that was activated / displayed when the “beige” button was pressed in the second event / function, it are must put that color/material in the object to which to the refers the “TOP BASE A” button.