Do not use ThreadPool in Edit Mode, instead run synchronously in main thread.