Next: Collision Destructor, Previous: Mouse Commander, Up: Interaction [Contents][Index]
This component allows the player to change the material on objects. You need to provide a list of materials to choose from, and a tag representing the objects that can be repainted. Legacy GUI is not recommended for mobile (in this case you must implement your own). Once the materials and tags are set, make sure this object is enabled when you want the player to be able to change the materials on an object. Then, when the player clicks the indicated mouse button (0 = left, 1 = right, 2 = middle) on an object with a listed tag, they will be able to change it’s materials using the GUI.
Material[]
materialsList of materials available as paint
string[]
paintableTagsList of tags of objects we can paint on
bool
useGUIShould we use the Legacy Unity GUI? Not suitable for mobile devices
Default value: true
Rect
guiAreaNormalized viewport rectangle indicating the area reserved for palette selection
Default value: new Rect(0.75f, 0.1f, 3.49f, 2f)
int
mouseButtonButton used to click on objects in the scene to select which material to replace
Default value: 1
Material[]
materialsList of materials available as paint
string[]
paintableTagsList of tags of objects we can paint on
bool
useGUIShould we use the Legacy Unity GUI? Not suitable for mobile devices
Default value: true
Rect
guiAreaNormalized viewport rectangle indicating the area reserved for palette selection
Default value: new Rect(0.75f, 0.1f, 3.49f, 2f)
int
mouseButtonButton used to click on objects in the scene to select which material to replace
Default value: 1
Next: Collision Destructor, Previous: Mouse Commander, Up: Interaction [Contents][Index]