public void RemovePrefabInstancesAsync(object param) { try { prefabManager.RemovePrefabInstances((IEnumerable <GPUInstancerPrefab>)param, runInThreads); } catch (Exception e) { if (runInThreads) { prefabManager.threadException = e; prefabManager.threadQueue.Enqueue(prefabManager.LogThreadException); } else { Debug.LogException(e); } } }