Exemple #1
0
        public override void Repaint(Event e)
        {
            Debug.Assert(GUIClip.Internal_GetCount() == 0, "UIElement is not compatible with IMGUI GUIClips, only GUIClip.ParentClipScope");

            m_RepaintVersion = version;

            // if the surface DPI changes we need to invalidate styles
            if (!Mathf.Approximately(currentPixelsPerPoint, GUIUtility.pixelsPerPoint))
            {
                currentPixelsPerPoint = GUIUtility.pixelsPerPoint;
                visualTree.IncrementVersion(VersionChangeType.StyleSheet);
            }

            repaintData.repaintEvent = e;
            Profiler.BeginSample(m_ProfileUpdateName);

            try
            {
                m_VisualTreeUpdater.UpdateVisualTree();
            }
            finally
            {
                Profiler.EndSample();
            }

            panelDebug?.Refresh();
        }
Exemple #2
0
        public override void Repaint(Event e)
        {
            if (contextType == ContextType.Editor)
            {
                Debug.Assert(GUIClip.Internal_GetCount() == 0, "UIElement is not compatible with IMGUI GUIClips, only GUIClip.ParentClipScope");
            }

            m_RepaintVersion = version;

            // in an in-game context, pixelsPerPoint is user driven
            if (contextType == ContextType.Editor)
            {
                pixelsPerPoint = GUIUtility.pixelsPerPoint;
            }

            repaintData.repaintEvent = e;
            Profiler.BeginSample(m_ProfileUpdateName);

            try
            {
                m_VisualTreeUpdater.UpdateVisualTree();
            }
            finally
            {
                Profiler.EndSample();
            }

            panelDebug?.Refresh();
        }
Exemple #3
0
        public override void Repaint(Event e)
        {
            if (contextType == ContextType.Editor)
            {
                Debug.Assert(GUIClip.Internal_GetCount() == 0, "UIElement is not compatible with IMGUI GUIClips, only GUIClip.ParentClipScope");
            }

            m_RepaintVersion = version;

            // in an in-game context, pixelsPerPoint is user driven
            if (contextType == ContextType.Editor)
            {
                pixelsPerPoint = GUIUtility.pixelsPerPoint;
            }

            repaintData.repaintEvent = e;

            using (m_MarkerUpdate.Auto())
            {
                m_VisualTreeUpdater.UpdateVisualTree();
            }

            panelDebug?.Refresh();
        }