OnGUI() public méthode

public OnGUI ( Rect rect ) : void
rect UnityEngine.Rect
Résultat void
Exemple #1
0
        void TestLargeTreesWithFixedItemHeightAndPingingAndFraming()
        {
            Rect leftRect  = new Rect(0, 0, position.width / 2, position.height);
            Rect rightRect = new Rect(position.width / 2, 0, position.width / 2, position.height);

            if (m_TreeViewTest == null)
            {
                m_BackendData = new BackendData();
                m_BackendData.GenerateData(1000000);

                bool lazy = false;
                m_TreeViewTest = new TreeViewTest(this, lazy);
                m_TreeViewTest.Init(leftRect, m_BackendData);

                lazy            = true;
                m_TreeViewTest2 = new TreeViewTest(this, lazy);
                m_TreeViewTest2.Init(rightRect, m_BackendData);
            }

            m_TreeViewTest.OnGUI(leftRect);
            m_TreeViewTest2.OnGUI(rightRect);
            EditorGUI.DrawRect(new Rect(leftRect.xMax - 1, 0, 2, position.height), new Color(0.4f, 0.4f, 0.4f, 0.8f));
        }