블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2563)N
Unity3D (699)
Programming (461)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (213)
협업 (45)
3DS Max (3)
Game (12)
Utility (133)
Etc (95)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (45)N
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (37)
Thinking (37)
한글 (28)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total1,645,818
Today9
Yesterday509
07-08 01:01

달력

« » 2022.7
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

공지사항

태그목록

'Timers'에 해당되는 글 1건

  1. 2021.10.20 [펌] Unity Timers

[펌] Unity Timers

Unity3D/Plugins / 2021. 10. 20. 14:23
반응형

 

 

 

We may decide to execute a function not right now, but at a certain time later. That’s called “scheduling a call”. The Timers class helps you to do so with a clean and short syntax without having to worry about enumerators.

Installation · Documentation · License

Made with ♥ by Jeffrey Lanters

 

Installation

Using the Unity Package Manager

Install the latest stable release using the Unity Package Manager by adding the following line to your manifest.json file located within your project's Packages directory, or by adding the Git URL to the Package Manager Window inside of Unity.

"nl.elraccoone.timers": "git+https://github.com/jeffreylanters/unity-timers"

Using OpenUPM

The module is availble on the OpenUPM package registry, you can install the latest stable release using the OpenUPM Package manager's Command Line Tool using the following command.

openupm add nl.elraccoone.timers

Documentation

Syntax

using ElRaccoone.Timers;
Timers.SetTimeout(/* miliseconds */ 1000, /* callback */ () => { /* ... */ });
Timers.SetInterval(/* miliseconds */ 1000, /* callback */ () => { /* ... */ });

Description

We may decide to execute a function not right now, but at a certain time later. That’s called “scheduling a call”. Note that the timers are using unscaled time.

There are two methods for it:

  • setTimeout allows to run a function once after the interval of time.
  • setInterval allows to run a function regularly with the interval between the runs.

Examples

public class MyClass {
  private void Awake () {
    Timers.SetTimeout(1000, () => {
      Debug.Log("A second has passed!");
    });
    Timers.SetTimeout(1000, Notifiy);
    Timers.SetInterval(2500, Notifiy);
  }
  private void Notify () {
    Debug.Log("Notify!!");
  }
}

 

 

[출처] https://openupm.com/packages/nl.elraccoone.timers/#installation

 

📦 Timers - nl.elraccoone.timers

 

openupm.com

 

반응형

'Unity3D > Plugins' 카테고리의 다른 글

[Package] Unity Quick Search  (0) 2022.02.18
[링크] UniTask  (0) 2022.01.11
[펌] Unity Timers  (0) 2021.10.20
[펌] Unity Bezier Solution  (0) 2021.10.12
[에셋] I2 Localization(Android/iOS app_name Localization)  (0) 2021.02.25
[링크] 유니티 Easy Save 정리  (2) 2020.04.03
Posted by blueasa
TAG ,

댓글을 달아 주세요