示例#1
0
    private void Awake()
    {
        ColourChooser.AddVisual(this);
        ChangeActiveColourChannelButton.AddVisual(this);

        _color = FindObjectOfType <ColourChooser>();

        _leftColorID   = Shader.PropertyToID("_LeftColor");
        _centerColorID = Shader.PropertyToID("_CenterColor");
        _rightColorID  = Shader.PropertyToID("_RightColor");

        _previewMaterial = GetComponent <Image>().material;
    }
示例#2
0
 private void Awake()
 {
     _background = GetComponent <Image>();
     ColourChooser.AddVisual(this);
 }
 private void Awake()
 {
     _text = GetComponent <Text>();
     ColourChooser.AddVisual(this);
 }