To schedule a sound to play after a given delay, do the following:
- Create a new Unity 2D project and import the provided sound clip files.
- Create a GameObject in the scene containing an AudioSource component linked to the metronome_tick AudioClip. This can be done in a single step by dragging the music clip from the Project panel into either the Hierarchy or Scene panels.
- Repeat the previous step to create another GameObject, containing an AudioSource linked to the metronome_tick_accent clip.
- For both AudioSources created, uncheck the Play Awake property – so these sounds do not begin playing as soon as the scene is loaded.
- Create an empty GameObject named MetronomeManager.
- Create a C# script class, Metronome, in a new ...