When changing materials in Verse using the SetMaterial function to modify a creative_prop’s material, is it possible to change only a specific part of the prop if it has multiple material elements, rather than just a single one?
If so, how should the code be written to achieve this?
Even when I write PaintProp.SetMaterial(Materials.PaintPicker_Black, 1),
an error still occurs.
I want to change material slot [1] to Black, but it doesn’t work.
looking at the documentation, it seems that you have a parameter for choosing which material slot you update
# Changes the Material of the Mesh used by this instance. Optionally can specify which Mesh element index to apply the material to, otherwise defaults to the 0 (default) Mesh element
SetMaterial<native><public>(Material:material, ?Index:int = external {})<transacts>:void
SetMaterial(MyMaterial, ?Index := 2)