Rhythm Game Starter
  • 🎹Rhythm Game Starter
  • 🌈Showcase
  • 💡FAQ
  • 💻Demo
  • Quick Start
  • ➡️Getting Started
    • Template Workflow
    • Bare Workflow
  • ⭐Components Overview
    • Input Handling [New]
    • Song Manager
    • Stats System
    • Track Manager
    • Track
  • 🎙️Importing Songs
  • 🎼Creating Song Map
    • Recording Mode [0.5+]
    • Sequence Editor
    • Midi Import
      • Track Mapping
      • Note Type Mapping
  • ⏯️Control Song Play / Pause
  • ✨Customization
    • Custom Notes
    • Customize note instance in runtime
    • Note Effects
  • Integration
    • Naninovel
  • Advance
    • Asmdef
  • Notices
    • ⚠️ Limitations
  • Development
    • 💡Development Tips
    • 🔧Changelog
  • Support
    • 💬Discord
    • Asset Store
    • Main Site
Powered by GitBook
On this page
  • Overview
  • Playing song via code
  • Song controls

Was this helpful?

  1. Components Overview

Song Manager

Component that handles the audio playback and the timing for synchronization.

PreviousInput Handling [New]NextStats System

Last updated 3 years ago

Was this helpful?

Overview

Playing song via code

Reference your SongManager as a variable and invoke the PlaySong function to pass in your SongItem

void SomeMethod() {
    ...
    songManager.PlaySong(songItem);
    ...
}

Song controls

To pause playing the song.

void SomeMethod() {
    ...
    songManager.PauseSong();
    ...
}

When pausing the song, the note will also be paused in the scene, util you resume.

To resume the song.

void SomeMethod() {
    ...
    songManager.ResumeSong();
    ...
}

To stop the song.

void SomeMethod() {
    ...
    songManager.StopSong();
    ...
}

⭐