Easy Invoke - Code delay and flexible coroutine handling.

I’ve just released Easy Invoke on the Asset Store. It comprises a collection of functions and methods I’ve been using in my own apps and games for several years. These utilities address common issues, such as delaying code execution and repeating it at regular intervals.

In upcoming updates, I plan to enhance Easy Invoke by adding features that allow pausing and restarting of jobs and coroutines. While I haven’t implemented this so far because I've never had the need, I recognize that it could be valuable for others in specific situations.

Please feel to make any suggestions for improvements or for any other reason.

Asset Store Page
Online documentation


What is Easy Invoke?
Easy Invoke is a powerful and flexible tool designed to enhance scripting in Unity environments by simplifying the management and execution of coroutines and asynchronous tasks. Aimed at developers looking to streamline complex timing and task sequences in their applications, Easy Invoke provides a robust API that integrates seamlessly with Unity's native coroutine system and extends its capabilities to non-MonoBehaviour scripts.

Key Features of EasyInvoke

• Delay Code Execution
Easily delay execution of parameterless and parameterized methods.

• Advanced Coroutine Handling
Allows the initiation, management, and stopping of coroutines from scripts that do not inherit from MonoBehaviour, facilitating more modular and reusable code architectures.
Run coroutines that can be easily paused, resumed and restarted.

• Task Conversion
Can run coroutines as tasks for use in multithreaded applications, enhancing the ability to perform asynchronous operations alongside Unity's main thread.

• Frame Skipping
Offers methods to delay the execution of actions by skipping frames, providing more control over the timing and sequencing of game logic.

• Chainable Methods
Supports the creation of chains of methods and delays, which can be executed in sequence to coordinate complex sets of operations with precise timing.

• Repeatable Jobs
Enables the scheduling of repeatable tasks that can execute actions at fixed intervals, which is ideal for tasks such as polling or continuous checks within the game environment.

Easy Invoke is designed to be intuitive and easy to integrate, requiring minimal setup to get started. Whether you are developing complex game mechanics, interactive animations, or any system that requires precise timing control, Easy Invoke aims to provide a straightforward and powerful solution to manage these needs effectively.

Online documentation

I've just submitted Version 1.04 to the Asset Store.

This version adds methods to control coroutines, allowing you to easily pause/resume and restart them.

I'll update here once it's been approved and is available on the Asset Store.

1 Like

Version 1.04 is now available on the Asset Store.

You can now run coroutines that can easily be paused/resumed and restarted.
9882141--1425684--Screenshot 2024-06-08 121535.png

Easy Invoke Version 1.05 is now live on the Asset Store.

Version 1.05 Changes

Minor bug fixes.
Added extra properties that enable coroutine state to be monitored for active and running state, in addition to paused state.

Easy Invoke Version 1.06 is now live on the Asset Store.

This version adds the option to have a coroutine automatically terminate when a target object becomes null.9895761--1428813--Chain.jpg 9895770--1428831--Looping Chain.jpg 9895761--1428819--Parameterised Delay.jpg 9895770--1428837--Parameterless Delay.jpg 9895761--1428825--WaitUntil.jpg