Modifica

Condividi tramite


ColorChanger Class

Definition

Change the color of the material on a renderer. Useful for visualizing button presses.

public ref class ColorChanger : UnityEngine::MonoBehaviour
[UnityEngine.AddComponentMenu("Scripts/MRTK/Examples/ColorChanger")]
public class ColorChanger : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Examples/ColorChanger")>]
type ColorChanger = class
    inherit MonoBehaviour
Public Class ColorChanger
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
ColorChanger
Attributes
UnityEngine.AddComponentMenuAttribute

Constructors

ColorChanger()

Fields

cur
mats
rend

Methods

Decrement()

Decrements to the previous material in the input list of materials and applies it to the renderer.

Increment()

Increments to the next material in the input list of materials and applies it to the renderer.

RandomColor()

Sets a random color on the renderer's material.

Applies to