Delay
Simple delay class to execute code after a certain amount of time
com.sandrofigo.delay-unity3d delaysopenupmtimingunityunity-3dunity-scriptsunity2dunity3dunity3d-pluginutilityutility-classesutility-library
Unity Compatibility
Unity 6 Not tested
2023.2 Not tested
2023.1 Not tested
2022.3 LTS Not tested
2021.3 LTS Not tested
2020.3 LTS Not tested
2019.4 LTS Not tested
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/delay-unity3d.git 
README Markdown
Copy this to your project's README.md
## Installation
Add **Delay** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/delay-unity3d.git
```
[](https://www.pkglnk.dev/pkg/delay-unity3d)Used By (1)
README
Delay
Simple delay class to execute code after a certain amount of time in Unity.
Installation
There are multiple ways to install this package into your project:
- Add it to your project through OpenUPM (recommended)
- Add the package to the Unity package manager using the HTTPS URL of this repository (recommended)
- Download the whole repository as a .zip and place the contents into a subfolder in your assets folder
- Fork the repository and add it as a submodule in git
Usage
using Timing;
using UnityEngine;
public class FooBar : MonoBehaviour
{
public void Start()
{
Delay.Create(1f, () => Debug.Log("I will be executed after 1 second."));
Delay.WaitUntil(() => Time.time >= 5f, () => Debug.Log("I will wait until the provided condition is true."));
}
}
Collaboration
Support this project with a ⭐️, report an issue or if you feel adventurous and would like to extend the functionality open a pull request.
Comments
No comments yet. Be the first!
Sign in to join the conversation
Sign In