Good evening, everyone. I would like to create a Menu UI, which I call up via the "Menu" button on my Quest 2. From it I would like to catalog different materials (which I already have in the Asset downloaded) and be able to change the material present in an object in the scene (perhaps selecting it from XR Controller) with one from the previous catalog. Any thoughts on this? Where to start?
#Through Menu UI, I would like to catalog different materials that I can make an object in the scene
1 messages · Page 1 of 1 (latest)
this is a test scene. in it i created a "Change Material" menu. Each button will correspond to a material linked to the "MaterialSelect" script attached to the red cube you see. In addition there is a Reset button that resets the color of the cube for me.
this is my "MaterialSelect" script. This is called in OnClick() by the different Buttons.
Now based on this, I would like to change it like this: I have the different materials (in my example case 5). From the menu choose the material and then apply it to the cube via raycast interaction. How can I implement this? So the keep the material selected and then apply it to the object?
It seems like you have done everything already besides raycasting to get the cube? I don't get what you need help knowing how to do.
the one done so far works. each button changes me the material of the cube, among the ones I set in the array. Now instead as I wrote before: clicking the button I select the material, keep it and then through the radius point to the cube and confirm the replacement of the material of the cube with the one previously selected.
that in my case I will translate it through Dropdown and in each entry of it is the array material.
Just have a field that is assigned the material on button press, and then that assigned material is used by the raycast