private void StartTextureProcessing(string textureUrl) { PTaskScheduler taskScheduler = TaskSchedulerHelper.GetTaskScheduler(); IUniTask task = new ImmediateTask( () => DownloadAndFilter(textureUrl) ); taskScheduler.Enqueue(task); }
private void GetColorsFromDownloadedTexture() { mFilteredTexture = new Texture2D(4, 4); mFilteredTexture.LoadImage(mTextureData); mTextureData = null; mTextureColors = mFilteredTexture.GetPixels(); mWidth = mFilteredTexture.width; mHeight = mFilteredTexture.height; Debug.Log("Texture loaded"); PTaskScheduler taskScheduler = TaskSchedulerHelper.GetTaskScheduler(); IUniTask task = new ImmediateTask(FilterTexture); taskScheduler.Enqueue(task); }