Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            //base.OnInspectorGUI();
            MicroLightCanvas Manager = (MicroLightCanvas)target;

            Manager.UseCurvedUI = EditorGUILayout.Toggle("UseCurvedUI", Manager.UseCurvedUI, GUILayout.ExpandWidth(true));

            Manager.Angle = EditorGUILayout.Slider("Angle", Manager.Angle, -360, 360, GUILayout.ExpandWidth(true));
            Manager.baseCircleSegments = (int)EditorGUILayout.Slider("Segments", Manager.baseCircleSegments, 1, 100, GUILayout.ExpandWidth(true));
            Manager.Quality            = EditorGUILayout.Slider("Quality", Manager.Quality, 1, 10, GUILayout.ExpandWidth(true));

            Manager.DoUpdate();
            EditorGUILayout.Separator();
        }
Esempio n. 2
0
        void FindParentSettings()
        {
            if (mySettings == null)
            {
                mySettings = GetComponentInParent <MicroLightCanvas>();

                if (mySettings == null)
                {
                    return;
                }

                myCanvas = mySettings.GetComponent <Canvas>();
                angle    = mySettings.Angle;

                myImage = GetComponent <Image>();
            }
        }
Esempio n. 3
0
        public void DropDownClick()
        {
            CanvasRaycastMethod.ClearTarget();
            CanvasRaycastMethod.AddTarget(this);

            m_canvasbuf = transform.GetComponentsInChildren <Canvas>();
            for (int i = 0; i < m_canvasbuf.Length; i++)
            {
                MicroLightCanvas microLightCanvas = m_canvasbuf[i].GetComponent <MicroLightCanvas>();
                if (microLightCanvas == null)
                {
                    microLightCanvas             = m_canvasbuf[i].gameObject.AddComponent <MicroLightCanvas>();
                    microLightCanvas.UseCurvedUI = false;
                    CanvasRaycastMethod.AddTarget(microLightCanvas);
                    microLightCanvasBuf.Add(microLightCanvas);
                }
            }
        }