Пример #1
0
        protected void _AlphaSlider(ref Rect rect, UnityObject obj, Color color, Action <Color> changed)
        {
            rect.width = 40;

            ScopeChange.Begin();
            var _a = HEditorGUI.Slider(rect, color.a, 0, 1);

            if (ScopeChange.End())
            {
                EditorHelper.Dirty(obj, () => {
                    changed(ColorUtils.RGBA(color, _a));
                });
            }
            rect.x += rect.width + 4;
        }
Пример #2
0
        protected void _AlphaSlider(ref Rect rect, UnityObject obj, float alpha, Action <float> changed)
        {
            rect.width = 40;

            ScopeChange.Begin();
            var _a = HEditorGUI.Slider(rect, alpha, 0, 1);

            if (ScopeChange.End())
            {
                EditorHelper.Dirty(obj, () => {
                    changed(_a);
                });
            }
            rect.x += rect.width + 4;
        }