void OnEnable()
 {
     if (m_luaDiffScrollView == null)
     {
         m_luaDiffScrollView = new LuaDiffScrollView();
     }
 }
Exemplo n.º 2
0
        void OnEnable()
        {
            if (m_TreeViewState == null)
            {
                m_TreeViewState = new TreeViewState();
            }

            if (m_luaRefScrollView == null)
            {
                m_luaRefScrollView = new LuaRefScrollView();
            }

            if (m_luaDiffScrollView == null)
            {
                m_luaDiffScrollView = new LuaDiffScrollView();
            }

            m_SearchField = new SearchField();

            LuaProfilerTreeView.m_nodeDict.Clear();
            startFrame = 0;
            endFrame   = 0;
            m_TreeView = new LuaProfilerTreeView(m_TreeViewState, position.width - 40);
            if (sortColIndex > 0)
            {
                m_TreeView.multiColumnHeader.SetSorting(sortColIndex, isAscending);
            }
            oldStartUrl = null;
            oldEndUrl   = null;
            Destory(oldStartT);
            Destory(oldEndT);
            disableChart = null;
            Destory(disableChart);
            luaChart = null;
            Destory(luaChart);
            monoChart = null;
            Destory(monoChart);
            fpsChart = null;
            Destory(fpsChart);
            pssChart = null;
            Destory(pssChart);
            powrChart = null;
            Destory(powrChart);
            Destory(boxTex);
            boxTex       = null;
            m_gs         = null;
            currentStyle = null;
            m_SearchField.downOrUpArrowKeyPressed += m_TreeView.SetFocusAndEnsureSelectedItem;
            OpenLocalMode();

            EditorApplication.update -= m_TreeView.DequeueSample;
            EditorApplication.update += m_TreeView.DequeueSample;
            EditorApplication.update -= m_luaRefScrollView.DequeueLuaInfo;
            EditorApplication.update += m_luaRefScrollView.DequeueLuaInfo;
        }