Ejemplo n.º 1
0
		// [Enable Tracking] | [Enable StackTrace]
		void RenderHeadPanel() {
			EditorGUILayout.BeginVertical(EmptyLayoutOption);
			EditorGUILayout.BeginHorizontal(EditorStyles.toolbar, EmptyLayoutOption);

			if (GUILayout.Toggle(EnableAutoReload, EnableAutoReloadHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableAutoReload) {
				TaskTracker.EditorEnableState.EnableAutoReload = !EnableAutoReload;
			}

			if (GUILayout.Toggle(EnableTracking, EnableTrackingHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableTracking) {
				TaskTracker.EditorEnableState.EnableTracking = !EnableTracking;
			}

			if (GUILayout.Toggle(EnableStackTrace, EnableStackTraceHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableStackTrace) {
				TaskTracker.EditorEnableState.EnableStackTrace = !EnableStackTrace;
			}

			GUILayout.FlexibleSpace();

			if (GUILayout.Button(ReloadHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) {
				TaskTracker.CheckAndResetDirty();
				treeView.ReloadAndSort();
				Repaint();
			}

			if (GUILayout.Button(GCHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) {
				GC.Collect(0);
			}

			EditorGUILayout.EndHorizontal();
			EditorGUILayout.EndVertical();
		}
Ejemplo n.º 2
0
		private void Update() {
			if (EnableAutoReload) {
				if (interval++ % 120 == 0) {
					if (TaskTracker.CheckAndResetDirty()) {
						treeView.ReloadAndSort();
						Repaint();
					}
				}
			}
		}