public static void SetControl(FlowSystemEditorWindow rootWindow, FlowWindow window, System.Action<float> onProgress) {

			if (EditorApplication.SaveCurrentSceneIfUserWantsTo() == true) {
				
				FlowSceneView.editAnimation = new UnityEditor.AnimatedValues.AnimFloat(0f, () => {

					onProgress(FlowSceneView.editAnimation.value);

				});
				FlowSceneView.editAnimation.value = 0f;
				FlowSceneView.editAnimation.speed = 2f;
				FlowSceneView.editAnimation.target = 1f;

				FlowSceneView.currentItem = new FlowSceneItem(rootWindow, window, FlowSceneView.editAnimation);
				FlowSceneView.isActive = true;

			}

		}
		public static void Reset(System.Action<float> onProgress, bool onDestroy = false) {
			
			FlowSceneView.editAnimation = new UnityEditor.AnimatedValues.AnimFloat(1f, () => {
				
				onProgress(FlowSceneView.editAnimation.value);
				
			});
			FlowSceneView.editAnimation.value = 1f;
			FlowSceneView.editAnimation.speed = 2f;
			FlowSceneView.editAnimation.target = 0f;

			if (FlowSceneView.currentItem != null) FlowSceneView.currentItem.Dispose(onDestroy, FlowSceneView.editAnimation);
			FlowSceneView.currentItem = null;
			
			FlowSceneView.isActive = false;
			
		}
		public static void SetControl(FlowSystemEditorWindow rootWindow, FD.FlowWindow window, System.Action<float> onProgress) {

			#if UNITY_5_2
			if (EditorApplication.SaveCurrentSceneIfUserWantsTo() == true) {
			#else
			if (UnityEditor.SceneManagement.EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo() == true) {
			#endif

				FlowSceneView.editAnimation = new UnityEditor.AnimatedValues.AnimFloat(0f, () => {

					onProgress(FlowSceneView.editAnimation.value);

				});
				FlowSceneView.editAnimation.value = 0f;
				FlowSceneView.editAnimation.speed = 2f;
				FlowSceneView.editAnimation.target = 1f;

				FlowSceneView.currentItem = new FlowSceneItem(rootWindow, window, FlowSceneView.editAnimation);
				FlowSceneView.isActive = true;

			}

		}