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(); } } }
void OnDisable () { instance = null; }
void OnEnable () { instance = this; }
void OnDisable() { instance = null; }
void OnEnable() { instance = this; }