Quick Start
Last updated
Last updated
After importing the package, the first thing you want to do is to add the Rhythm Engine component to your scene. Or if your game doesn't require audio sync for gameplay, and just for audio spectrum driven visuals, you can check out Standalone Band Listener Sample.
First choice you're going to make is choosing the mode that the Rhythm Engine is going to work in. Automatic Mode is suited for scenes which have a specific song linked to them, but if you want to change the song during the gameplay, you'd want to choose Manual Mode.
Both modes require a Music Audio Source, and because Rhythm Engine requires an Audio Source on the same GameObject, be sure to create a seperate GameObject for it.
There are also two parameters in both modes (Offset and PreStartTime), be sure to hover over them to learn more about what they do.
Automatic mode requires a Song to work. Choose a demo song or create a new one by right clicking in your project folder -> Create -> RhythmEngine -> Songs -> Song/SequencedSong or by pressing the "New Song" button next to the "No Song Set." warning.
Visit Song Setup to check out how to setup a Song Scriptable Object.
With a correctly setup song, you can now press Play and everything should be up and running!
Manual mode doesn't require a Song to work, but can work with them. For simplicity sake, let's make sure you have a demo song prepared or create a new one by right clicking in your project folder -> Create -> RhythmEngine -> Songs -> Song/SequencedSong.
Visit Song Setup to check out how to setup a Song Scriptable Object.
With correctly setup song, you need a script that controls Rhythm Engine to play the song and start the audio sync.
Mania Editor Sample has an example on how you could make that script. But the gist of it is:
Another method of working in Manual Mode is using RhythmEngine.SetClip()
instead of SetSong()
which allows you to get the audio sync without using any of the premade song scripts.
Now you should be ready to start Rhythm Gaming! Try using the BeatSequencer to quickly add audio synced logic to your game or check out the AudioBandListener to create audio frequency based visuals! You can also use neither and use precisely timed events like in the Mania Game Sample.
Be sure to check out the Samples, they are a great resource to learn more about the asset.