Draw Call Viewer shows a list of draw calls created by NGUI and lets you hide them selectively.
상속: EditorWindow
예제 #1
0
    void Update()
    {
        if (mCurObj)
        {
            var now = DateTime.Now;
            if ((now - mTimer).TotalMilliseconds < Interval)
            {
                return;
            }
            mTimer = now;

            var p1   = mCurObj.GetComponent <UIPanel>();
            var root = p1 ?? mRootPanel;
            if (UIDrawCallViewer.AutoAdjustDepth(root, mStep++))
            {
                mStep = 0;

                EditorUtility.DisplayProgressBar("Draw Call Optimize", mCurObj.name, 1.0f * mIndex / mCount);

                var path = AssetDatabase.GetAssetPath(mGosEnumerator.Current);
                PrefabUtility.CreatePrefab(path, mCurObj);
                DestroyImmediate(mCurObj);
                GetNextObj();
            }
        }
    }
예제 #2
0
	void OnDisable () { instance = null; }
예제 #3
0
	void OnEnable () { instance = this; }
예제 #4
0
 void OnDisable()
 {
     instance = null;
 }
예제 #5
0
 void OnEnable()
 {
     instance = this;
 }