Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sandrofigo/delay-unity3d
Simple delay class to execute code after a certain amount of time in Unity
https://github.com/sandrofigo/delay-unity3d
delays openupm timing unity unity-3d unity-scripts unity2d unity3d unity3d-plugin utility utility-classes utility-library
Last synced: 4 months ago
JSON representation
Simple delay class to execute code after a certain amount of time in Unity
- Host: GitHub
- URL: https://github.com/sandrofigo/delay-unity3d
- Owner: sandrofigo
- License: unlicense
- Created: 2022-08-11T19:04:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-30T14:48:38.000Z (about 1 year ago)
- Last Synced: 2024-09-23T11:32:09.971Z (4 months ago)
- Topics: delays, openupm, timing, unity, unity-3d, unity-scripts, unity2d, unity3d, unity3d-plugin, utility, utility-classes, utility-library
- Language: C#
- Homepage:
- Size: 33.2 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Delay
Simple delay class to execute code after a certain amount of time in Unity.[![openupm](https://img.shields.io/npm/v/com.sandrofigo.delay-unity3d?label=openupm®istry_uri=https://package.openupm.com)](https://openupm.com/packages/com.sandrofigo.delay-unity3d/)
## Installation
There are multiple ways to install this package into your project:
- Add it to your project through [OpenUPM](https://openupm.com/packages/com.sandrofigo.delay-unity3d/) (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
```csharp
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.