Init() private method

private Init ( Gradient newGradient ) : void
newGradient UnityEngine.Gradient
return void
コード例 #1
0
        // Static methods
        public static void Show(Gradient newGradient, bool hdr)
        {
            GUIView currentView = GUIView.current;

            PrepareShow(hdr);
            s_GradientPicker.m_DelegateView = currentView;
            s_GradientPicker.m_Delegate     = null;
            s_GradientPicker.Init(newGradient, hdr);

            GradientPreviewCache.ClearCache();
        }
コード例 #2
0
        private static void Show(Gradient newGradient, bool hdr, ColorSpace colorSpace, System.Action <Gradient> onGradientChanged, GUIView currentView)
        {
            PrepareShow(hdr, colorSpace);
            s_GradientPicker.m_DelegateView = currentView;
            s_GradientPicker.m_Delegate     = onGradientChanged;
            s_GradientPicker.Init(newGradient, hdr, colorSpace);

            GradientPreviewCache.ClearCache();
        }
コード例 #3
0
        public static void Show(Gradient newGradient)
        {
            GUIView current = GUIView.current;

            if (s_GradientPicker == null)
            {
                s_GradientPicker = (GradientPicker)EditorWindow.GetWindow(typeof(GradientPicker), true, "Gradient Editor", false);
                Vector2 vector  = new Vector2(360f, 224f);
                Vector2 vector2 = new Vector2(1900f, 3000f);
                s_GradientPicker.minSize        = vector;
                s_GradientPicker.maxSize        = vector2;
                s_GradientPicker.wantsMouseMove = true;
                s_GradientPicker.ShowAuxWindow();
            }
            else
            {
                s_GradientPicker.Repaint();
            }
            s_GradientPicker.m_DelegateView = current;
            s_GradientPicker.Init(newGradient);
        }