public void LoadPDF() { if (!isLoading) { isLoading = true; Thread thread = new Thread(() => { PDFManager.ConvertPDF(pathPDF, pathSave, firstPage, lastPage, width, height); isThreadEnd = true; }); thread.Start(); StartCoroutine(EndLoadPDF()); } }