Esempio n. 1
0
    private void StartTextureProcessing(string textureUrl)
    {
        PTaskScheduler taskScheduler = TaskSchedulerHelper.GetTaskScheduler();
        IUniTask       task          = new ImmediateTask(
            () => DownloadAndFilter(textureUrl)
            );

        taskScheduler.Enqueue(task);
    }
Esempio n. 2
0
    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);
    }