Skip to content

JaredHalpern/Timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Build a Reusable Timer in Unity to Control Explosions (and other fun stuff too…)

This code accompanies this blog post.

In this post, we’re going to learn how to build a Timer that does something when the time elapses. The mechanism to do something will be customizable and generic enough so that you can use it to programmatically execute basically anything you can script. In the example we build, we will script the explosion animation to show when the time elapses. The Timer will be built as a standalone script which can be attached to any GameObject in Unity and reused.