static void CompilePendingFiles() { InkLibrary.CreateOrReadUpdatedInkFiles(InkLibrary.Instance.pendingCompilationStack); foreach (var pendingFile in GetUniqueMasterInkFilesToCompile(InkLibrary.Instance.pendingCompilationStack)) { InkCompiler.CompileInk(pendingFile); } InkLibrary.Instance.pendingCompilationStack.Clear(); }
static void CompilePendingFiles() { InkLibrary.CreateOrReadUpdatedInkFiles(InkLibrary.Instance.pendingCompilationStack); foreach (var pendingFile in GetUniqueMasterInkFilesToCompile(InkLibrary.Instance.pendingCompilationStack)) { InkCompiler.CompileInk(pendingFile); } // Files are removed when they're compiled, but we clear the list now just in case. InkLibrary.Instance.pendingCompilationStack.Clear(); }
private static void PostprocessInkFiles(List <string> importedInkAssets) { if (EditorApplication.isPlaying && InkSettings.Instance.delayInPlayMode) { foreach (var fileToImport in importedInkAssets) { InkLibrary.AddToPendingCompilationStack(fileToImport); } } else { InkLibrary.CreateOrReadUpdatedInkFiles(importedInkAssets); InkCompiler.CompileInk(InkCompiler.GetUniqueMasterInkFilesToCompile(importedInkAssets).ToArray()); } }
private static void OnPlayModeChange(PlayModeStateChange change) { if (!EditorApplication.isPlayingOrWillChangePlaymode && EditorApplication.isPlaying && InkLibrary.Instance.pendingCompilationStack.Count > 0) { InkLibrary.CreateOrReadUpdatedInkFiles(InkLibrary.Instance.pendingCompilationStack); foreach (var pendingFile in GetUniqueMasterInkFilesToCompile(InkLibrary.Instance.pendingCompilationStack)) { InkCompiler.CompileInk(pendingFile); } InkLibrary.Instance.pendingCompilationStack.Clear(); } if (EditorApplication.isPlayingOrWillChangePlaymode && EditorApplication.isPlaying && compiling) { Debug.LogWarning("Entered Play Mode while Ink was still compiling. Recommend exiting and re-entering play mode."); } }
private static void PostprocessInkFiles(List <string> importedInkAssets) { if (EditorApplication.isPlaying && InkSettings.Instance.delayInPlayMode) { foreach (var fileToImport in importedInkAssets) { if (!InkLibrary.Instance.pendingCompilationStack.Contains(fileToImport)) { InkLibrary.Instance.pendingCompilationStack.Add(fileToImport); } } } else { InkLibrary.CreateOrReadUpdatedInkFiles(importedInkAssets); foreach (var inkAssetToCompile in InkCompiler.GetUniqueMasterInkFilesToCompile(importedInkAssets)) { InkCompiler.CompileInk(inkAssetToCompile); } } }