예제 #1
0
        private void ColorPicker(List <Material> mat, string shaderParamName, string displayname = null)
        {
            if (displayname == null)
            {
                displayname = shaderParamName;
            }
            var picker = new JSONStorableColor(displayname, HSVColorPicker.RGBToHSV(1f, 1f, 1f),
                                               c => mat.ForEach(m => m.SetColor(shaderParamName, c.colorPicker.currentColor))
                                               );

            script.RegisterColor(picker);
            script.CreateColorPicker(picker, true);
        }