void UpdateProgress() { if (mProgress == 0) { return; } mProgressBar.style.display = DisplayStyle.Flex; if (mProgress == 1) { mProgressBar.value = 20f; mProgressBar.title = mProgressBar.value.ToString() + "%"; mTurnedOffLabel.text = PlasticLocalization.GetString( PlasticLocalization.Name.TurnOffPlasticSCMClosingWindow); mPlasticWindow = Resources.FindObjectsOfTypeAll <PlasticWindow>().First(); mPlasticWindow.Close(); mProgress = 2; return; } if (mProgress == 2) { mProgressBar.value = 50f; mProgressBar.title = mProgressBar.value.ToString() + "%"; mTurnedOffLabel.text = PlasticLocalization.GetString( PlasticLocalization.Name.TurnOffPlasticSCMCleaning); SetupCloudProjectId.SetCloudProjectId(""); mProgress = 3; return; } if (mProgress == 3) { mProgressBar.value = 75f; mProgressBar.title = mProgressBar.value.ToString() + "%"; mTurnedOffLabel.text = PlasticLocalization.GetString( PlasticLocalization.Name.TurnOffPlasticSCMDeleting); WorkspaceInfo workspaceInfo = FindWorkspace.InfoForApplicationPath( Application.dataPath, PlasticApp.PlasticAPI); Plastic.API.RemoveWorkspace(workspaceInfo); DrawInspectorOperations.Disable(); DrawSceneOperations.Disable(); mProgress = 4; return; } if (mProgress == 4) { mProgressBar.value = 100f; mProgressBar.title = mProgressBar.value.ToString() + "%"; mTurnedOffLabel.text = PlasticLocalization.GetString( PlasticLocalization.Name.Done); mProgress = 9999; return; } }
internal static void Disable() { try { PlasticApp.Dispose(); if (!sIsEnabledForWorkspace) { return; } AssetsProcessors.Disable(); AssetMenuItems.Disable(); DrawAssetOverlay.Disable(); DrawInspectorOperations.Disable(); DrawSceneOperations.Disable(); } finally { sIsEnabled = false; sIsEnabledForWorkspace = false; } }