public static IEnumerator DoReSaveAllFSMsInBuild() { feedback.StartProcedure("DoReSaveAllFSMsInBuild"); EditorCoroutine _LoadPrefabsWithPlayMakerFSMComponents_cr = EditorCoroutine.startManual(LoadPrefabsWithPlayMakerFSMComponents()); while (_LoadPrefabsWithPlayMakerFSMComponents_cr.routine.MoveNext()) { yield return(_LoadPrefabsWithPlayMakerFSMComponents_cr.routine.Current); } yield return(null); EditorCoroutine _saveAllFsminBuild_cr = EditorCoroutine.startManual(SaveAllFSMsInBuild()); while (_saveAllFsminBuild_cr.routine.MoveNext()) { yield return(_saveAllFsminBuild_cr.routine.Current); } yield return(null); EditorCoroutine _SaveAllTemplates_cr = EditorCoroutine.startManual(SaveAllTemplates()); while (_SaveAllTemplates_cr.routine.MoveNext()) { yield return(_SaveAllTemplates_cr.routine.Current); } yield return(null); // could trigger a Dialog in the ui for the user to acknowledge it's done. feedback.EndProcedure("DoReSaveAllFSMsInBuild"); }
IEnumerator DoScanProject(string assetsDescription) { _isProjectScanned = false; _cancelFlag = false; _isScanning = true; AssetsList = new Dictionary <string, AssetItem>(); Hashtable _assets = (Hashtable)JSON.JsonDecode(assetsDescription); AssetsFoundList = new string[0]; if (_assets == null) { Debug.LogError("Ecosystem Asset Description is invalid"); _isScanning = false; yield break; } yield return(null); foreach (DictionaryEntry entry in _assets) { yield return(null); EditorCoroutine _findAssetCoroutine = EditorCoroutine.startManual(FindAsset((Hashtable)entry.Value)); while (_findAssetCoroutine.routine.MoveNext()) { yield return(_findAssetCoroutine.routine.Current); } yield return(null); } _foundAssetsCountInProject = AssetsFoundList.Length; _isScanning = false; if (!_cancelFlag) { _isProjectScanned = true; if (OutputInConsole) { Debug.Log("Project Scanner scanned " + AssetsList.Count + " Assets descriptions"); } if (OutputInConsole) { Debug.Log(GetScanSummary()); } } yield break; }
IEnumerator DoScanProject(string assetsDescription) { _isProjectScanned = false; _cancelFlag = false; _isScanning = true; _hasError = false; AssetsList = new SortedDictionary <string, AssetItem>(); Hashtable _assets = (Hashtable)JSON.JsonDecode(assetsDescription); AssetsFoundList = new string[0]; AssetsNotFoundList = new string[0]; if (_assets == null) { Debug.LogError("Ecosystem Asset Description is invalid"); _hasError = true; _isScanning = false; yield break; } yield return(null); foreach (DictionaryEntry entry in _assets) { yield return(null); Hashtable _assetDescription = (Hashtable)entry.Value; if (!_assetDescription.ContainsKey("Enabled") || ((int)_assetDescription["Enabled"] == 1)) { EditorCoroutine _findAssetCoroutine = EditorCoroutine.startManual(FindAsset(_assetDescription)); while (_findAssetCoroutine.routine.MoveNext()) { yield return(_findAssetCoroutine.routine.Current); } } yield return(null); } // sort assets _foundAssetsCountInProject = AssetsFoundList.Length; _isScanning = false; if (!_cancelFlag) { _isProjectScanned = true; if (OutputInConsole) { Debug.Log("Project Scanner scanned " + AssetsList.Count + " Assets descriptions"); } if (OutputInConsole) { Debug.Log(GetScanSummary()); } } if (!string.IsNullOrEmpty(_editorPlayerPrefKey)) { EditorPrefs.SetString(_editorPlayerPrefKey, GetScanJsonSummary()); yield return(null); } yield break; }