Uploaded February 2023 | Updated November 2026, 15 hours ago
Ever wanted to make a rhythm game in Unity but struggle to keep your game and audio in sync? Unity doesn't read audio in seconds, but in packets. It works fine for uncompressed audio, but compressed audio leads to unreliable timekeeping.
In this video we create a super simple script that allows us to keep in sync with the audio and trigger events to the beat. All we have to do is tell it the BPM of the track.
And, yes, this video is the result of me--like many people--being very impressed with Hi-Fi Rush.
HOPE YOU LIKE IT!
VIDEO LINKS
------------------------------
The Music Used in the Example: freesound.org/people/Johnnie_Holiday/sounds/563651
The Asset Pack Used in the Example (Affiliate Link): assetstore.unity.com/packages/templates/tutorials/3d-game-kit-115747?aid=1101l9Tam
B3AGZ LINKS
------------------------------
Support the Content - b3agz.com/support-the-content
Join the Discord - discord.gg/aZgBgC2
Get b3agz Merch - shop.b3agz.com
B3AGZ SOCIALS
------------------------------
Twitch - twitch.tv/b3agz
Instagram - instagram.com/b3agz_
Facebook - facebook.com/b3agz
Twitter - twitter.com/b3agz
TikTok - tiktok.com/@b3agz
Mastadon - mastodonapp.uk/@b3agz
Chapters:
0:00 Intro
0:28 The Problem With Syncing Audio In Unity
1:20 My Solution
2:31 Here's a Scene I Prepared Earlier
3:52 CODE
10:21 Setting up the Beat
11:31 Testing the System
13:10 A Proper Demo Scene
13:39 Final Notes
13:59 Outro and Thanks
#Unity3D #RhythmGame #GameDev
Ever wanted to make a rhythm game in Unity but struggle to keep your game and audio in sync? Unity doesn't read audio in seconds, but in packets. It works fine for uncompressed audio, but compressed audio leads to unreliable timekeeping.
In this video we create a super simple script that allows us to keep in sync with the audio and trigger events to the beat. All we have to do is tell it the BPM of the track.
And, yes, this video is the result of me--like many people--being very impressed with Hi-Fi Rush.
HOPE YOU LIKE IT!
VIDEO LINKS
------------------------------
The Music Used in the Example: freesound.org/people/Johnnie_Holiday/sounds/563651
The Asset Pack Used in the Example (Affiliate Link): assetstore.unity.com/packages/templates/tutorials/3d-game-kit-115747?aid=1101l9Tam
B3AGZ LINKS
------------------------------
Support the Content - b3agz.com/support-the-content
Join the Discord - discord.gg/aZgBgC2
Get b3agz Merch - shop.b3agz.com
B3AGZ SOCIALS
------------------------------
Twitch - twitch.tv/b3agz
Instagram - instagram.com/b3agz_
Facebook - facebook.com/b3agz
Twitter - twitter.com/b3agz
TikTok - tiktok.com/@b3agz
Mastadon - mastodonapp.uk/@b3agz
Chapters:
0:00 Intro
0:28 The Problem With Syncing Audio In Unity
1:20 My Solution
2:31 Here's a Scene I Prepared Earlier
3:52 CODE
10:21 Setting up the Beat
11:31 Testing the System
13:10 A Proper Demo Scene
13:39 Final Notes
13:59 Outro and Thanks
#Unity3D #RhythmGame #GameDev










