Getting started
Before importing the asset in your project make sure to download the required packages from the package manager. Go to Window -> Package Manager.
Import the following packages:
- Timeline v1.2 or higher
If you do not import those packages prior this asset errors will pop up in the console.
The best way to get started is by trying out the demo scene. By checking the game objects in the scene and the components attached to them you’ll get an idea of how components interact with each other.
The main game objects to look at are:
- Game Managers
- Pool Manager : Automatically pools objects to improve performance
- Toolbox : Register and get any object from anywhere using the Toolbox
- Dsp Time : Get the Dsp Time or the adaptive Dsp Time from anywhere
- Rhythm Game Manager : The manager used in the demo to control the UI and the gameplay loop
- Score Manager : The manager that listens to the notes being triggered through events and manages the score
- Rhythm Director
- Rhythm Director : This takes care of setting all the parameters correctly when a timeline asset start playing, it also maps Track Objects to Timeline Rhythm Tracks.
- Playable Director : The default Timeline component used by the Rhythm Director (Make sure to set it as Update Method DPS Clock)
- Rhythm Processor : Takes care of managing Notes and receiving input event
- Rhythm Standard Input : Get input the standard way and tells the processor what was input was executed
- Game World -> Default -> TrackObjects
- Track Object : Define the start and end points for that track
When starting fresh it is recommended to duplicate the demo scene. and build on top.
Creating a new Scene
If you wish to create a scene follow these steps:
1) Create a new empty scene. 2) Drag and drop the “Rhythm Director” prefab and “Managers” prefab in the new Scene. 3) Drag and drop as many “Track Object” prefabs as you want (The demo songs use 4). Adjust their positions such that the target end position can be seen in the game view. 4) Make sure to reference those track objects in the director, under the Track Objects field. 5) (Optionally) Make sure to toggle the Play On Start option on the Rhythm Director. This will allow you to start playing your songs without having to create a game manager for selecting songs. The song timeline can be set in Playable field the Playable Director component next to the Rhythm Director 6) (Optionally) Add UI to display the score by assigning Text Mesh Pro components in the Score Manager (in Managers). 7) You may create a Rhythm Timeline Asset (learn how below) and set it in the Playable Director. Make sure the amount of tracks in the timeline matches the amount of track objects in the scene.
After following those steps you should be able to play your songs in the new scene. It is recommended you start creating your own custom Rhythm Game Manager from scratch to create your own gameplay loop. You are free to use the song chooser provided in the demo scene, but you may wish to create your own.
The rest of this documentation will teach you how to take advantage of each existing component and even extend them to fit your exact needs.