Skip to content

Provides a module for handling each sequence separately while executing UniTask in parallel.

License

Notifications You must be signed in to change notification settings

tanitaka-tech/ConcurrentUniTaskHandler

Repository files navigation

⚠️ this library is obsolete. please use https://github.com/tanitaka-tech/UnityProcessManager

Concurrent UniTask Handler

Provides a module for handling each sequence separately while executing UniTask in parallel.

Usage Example

Input wait loop

var result = await ConcurrentUniTaskHandler.Create(  
        // Effect
        ProcessTask.Create(  
            waitTask: WaitEffectRequestAsync,  
            onPassedTask: async ct =>  
            {  
                await PlayEffectAsync(ct);
                return true;  
            }),
    
        // Close
        ProcessTask.Create(  
            waitTask: WaitCloseRequestAsync,  
            onPassedTask: async ct =>  
            {  
                await CloseAsync(ct);
                return false;  
            }), 
    
        // NextScene
        ProcessTask.Create(  
            waitTask: WaitMoveNextSceneRequestAsync,  
            onPassedTask: async ct =>  
            {  
                await LoadNextSceneAsync(ct);
                return false;
            }), 
    )    
    .LoopProcessFirstCompletedTaskAsync(  
        checkNeedLoop: result => result,  
        cancellationToken: cancellationToken  
);

Installation

Install via git URL

  1. Open the Package Manager
  2. Press [+▼] button and click Add package from git URL...
  3. Enter the following:

Install via OpenUPM (not yet)

openupm add com.tanitaka-tech.concurrent-unitask-handler

Requirement

About

Provides a module for handling each sequence separately while executing UniTask in parallel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages